From 86aa908b60f07f484ec5e2eed70fad516147bb0d Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 16 Dec 2014 14:38:17 -0600 Subject: [PATCH] core: don't bounce disable_ipv6 if NM IPv6LL wasn't enabled (bgo #740702) If NM IPv6LL wasn't enabled then there is no need to bounce disable_ipv6 to tell the kernel to re-enable kernel IPv6LL, because kernel IPv6LL is already enabled. https://bugzilla.gnome.org/show_bug.cgi?id=740702 (cherry picked from commit 27c1a73ae0ad9af54caf468821d69a71ac862672) --- src/devices/nm-device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 957a8bf691..f572c1258a 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -4455,12 +4455,15 @@ act_stage3_ip6_config_start (NMDevice *self, if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0) { if (!priv->master) { + gboolean old_nm_ipv6ll = priv->nm_ipv6ll; + /* When activating an IPv6 'ignore' connection we need to revert back * to kernel IPv6LL, but the kernel won't actually assign an address * to the interface until disable_ipv6 is bounced. */ set_nm_ipv6ll (self, FALSE); - nm_device_ipv6_sysctl_set (self, "disable_ipv6", "1"); + if (old_nm_ipv6ll == TRUE) + nm_device_ipv6_sysctl_set (self, "disable_ipv6", "1"); restore_ip6_properties (self); } return NM_ACT_STAGE_RETURN_STOP;