summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-10-02 15:58:44 -0500
committerDan Williams <dcbw@redhat.com>2014-10-21 13:46:43 -0500
commitd37b7bed305dbed7b5351038850ef6bbb7ed9c59 (patch)
treed84d10cbdd88e516a4982bd5e45d083a9c3d027c
parent7e548d962a6cc86a7f9d2690c766772df4063c03 (diff)
downloadNetworkManager-d37b7bed305dbed7b5351038850ef6bbb7ed9c59.tar.gz
core: let kernel add IPv6LL address when method=ignore (rh #1132938)
The IPv6LL address handling in userspace patches failed to handle the case where the IPv6 method was 'ignore'. Previously the kernel would usually add the IPv6LL address itself, but if NM has turned off kernel IPv6LL then obviously this wouldn't happen. So when the method is 'ignore', turn off userspace IPv6LL handling and bounce disable_ipv6 to make the kernel add the IPv6LL address if it wants to.
-rw-r--r--src/devices/nm-device.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 1c01c8dc26..10dd77dbd7 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -3988,11 +3988,25 @@ act_stage3_ip6_config_start (NMDevice *self,
priv->dhcp6_mode = NM_RDISC_DHCP_LEVEL_NONE;
if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0) {
- if (!priv->master)
+ if (!priv->master) {
+ /* 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");
restore_ip6_properties (self);
+ }
return NM_ACT_STAGE_RETURN_STOP;
}
+ /* Any method past this point requires an IPv6LL address. Use NM-controlled
+ * IPv6LL if this is not an assumed connection, since assumed connections
+ * will already have IPv6 set up.
+ */
+ if (!nm_device_uses_generated_assumed_connection (self))
+ set_nm_ipv6ll (self, TRUE);
+
/* Re-enable IPv6 on the interface */
set_disable_ipv6 (self, "0");