core: even vor MODEM devices don't add IPv6 default routes without gateway

We'll ever have WWAN devices with a NULL gateway because the IPv6 over
WWAN still uses router advertisements to get a prefix. Thus you'll
always have a gateway if the device has real IPv6 connectivity.

For the IPv4 case, we still allow default routes without gateway on
WWAN.

https://bugzilla.gnome.org/show_bug.cgi?id=735512

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-11-07 14:09:24 +01:00
parent 6e409ef91f
commit 5dcd853bff

View file

@ -3355,11 +3355,10 @@ ip6_config_merge_and_apply (NMDevice *self,
priv->default_route.v6_has = _device_get_default_route_from_platform (self, AF_INET, (NMPlatformIPRoute *) route);
else {
gateway = nm_ip6_config_get_gateway (composite);
if ( gateway
|| nm_device_get_device_type (self) == NM_DEVICE_TYPE_MODEM) {
if (gateway) {
memset (route, 0, sizeof (*route));
route->source = NM_IP_CONFIG_SOURCE_USER;
route->gateway = gateway ? *gateway : in6addr_any;
route->gateway = *gateway;
route->metric = nm_device_get_ip6_route_metric (self);
route->mss = nm_ip6_config_get_mss (composite);
priv->default_route.v6_has = TRUE;