diff options
author | Dan Williams <dcbw@redhat.com> | 2014-12-19 10:45:31 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2015-01-09 13:56:40 -0600 |
commit | 984b0763d95eb503a1694bb90b3c09b221b54a0e (patch) | |
tree | 84488a1294deb2ce98c6e7500d46b12ecb5411a8 | |
parent | d746103d750e373414bf7257392b93185be870c6 (diff) | |
download | NetworkManager-984b0763d95eb503a1694bb90b3c09b221b54a0e.tar.gz |
core: force disable_ipv6=0 when turning on userspace IPv6LL (bgo #741773)
If a device assumes a connection without activating a user-requested or
NM-requested connection, then disable_ipv6 is not touched. When the device
is deactivated, it still isn't touched even though userspace IPv6LL
is enabled. This could lead to an user-requested activation with
IPv6 configuration, but disable_ipv6=1.
Whenever userspace IPv6LL is turned on, we should also set disable_ipv6=0
to ensure IPv6 can function. Userspace IPv6LL will ensure that the
interface does not have an address until the user/connection requests
it, which was the only reason that NM touched disable_ipv6 anyway.
fixes:NetworkManager_Test203_testcase_286589
fixes:NetworkManager_Test204_testcase_286590
https://bugzilla.gnome.org/show_bug.cgi?id=741773
-rw-r--r-- | src/devices/nm-device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index a9899535df..119d4a85c1 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -4345,11 +4345,12 @@ set_nm_ipv6ll (NMDevice *self, gboolean enable) if (enable) { /* Bounce IPv6 to ensure the kernel stops IPv6LL address generation */ value = nm_platform_sysctl_get (nm_utils_ip6_property_path (iface, "disable_ipv6")); - if (g_strcmp0 (value, "0") == 0) { + if (g_strcmp0 (value, "0") == 0) nm_device_ipv6_sysctl_set (self, "disable_ipv6", "1"); - nm_device_ipv6_sysctl_set (self, "disable_ipv6", "0"); - } g_free (value); + + /* Ensure IPv6 is enabled */ + nm_device_ipv6_sysctl_set (self, "disable_ipv6", "0"); } } |