From 2c0644908524b6d9256d377b28194ba3d10535d5 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 20 Jan 2015 14:19:08 +0100 Subject: [PATCH] device: require a direct route for IPv6 gateway In the IPv4 case, we check whether we have a direct route to the gateway also by looking at the configured addresses/subnets. That is correct, because every IPv4 address also implies a subnet route. For IPv6, we explicitly add all subnet routes manually (noprefixroute), hence, we have a direct route exactly if we have it in our list. Regardless of the configured IPv6 prefixes. --- src/devices/nm-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index f2fc68898d..7219b0616b 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -3521,8 +3521,8 @@ ip6_config_merge_and_apply (NMDevice *self, goto END_ADD_DEFAULT_ROUTE; - has_direct_route = ( nm_ip6_config_get_subnet_for_host (composite, gateway) - || nm_ip6_config_get_direct_route_for_host (composite, gateway)); + has_direct_route = nm_ip6_config_get_direct_route_for_host (composite, gateway) != NULL; + /* In the (!has_direct_route && !commit) case it is not clear whether