diff options
author | Thomas Haller <thaller@redhat.com> | 2014-11-07 14:09:24 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-11-07 15:23:12 +0100 |
commit | 5dcd853bff5044edaa135333223c89c075faeeca (patch) | |
tree | 25f6e005e0c0d65001e3ca54aa24941ed961e244 | |
parent | 6e409ef91f2da4905118816bfd708e718bc4292e (diff) | |
download | NetworkManager-5dcd853bff5044edaa135333223c89c075faeeca.tar.gz |
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>
-rw-r--r-- | src/devices/nm-device.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 3d7a34ba8a..9eb25c96aa 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -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; |