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.
This commit is contained in:
Thomas Haller 2015-01-20 14:19:08 +01:00
parent 4a83afd530
commit 2c06449085

View file

@ -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