From b652ac3cf3708f7b3efff40ab451340a1e759280 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 19 Dec 2014 10:45:31 -0600 Subject: [PATCH] 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 (cherry picked from commit 984b0763d95eb503a1694bb90b3c09b221b54a0e) --- src/devices/nm-device.c | 7 ++++--- 1 file 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"); } }