core: force disable_ipv6=0 when turning on userspace IPv6LL

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
This commit is contained in:
Dan Williams 2014-12-19 10:45:31 -06:00
parent 4ed8f9ecb6
commit 45434c0f2a

View file

@ -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");
}
}