diff options
author | Francesco Giudici <fgiudici@redhat.com> | 2017-09-19 18:25:21 +0200 |
---|---|---|
committer | Francesco Giudici <fgiudici@redhat.com> | 2017-09-21 12:02:21 +0200 |
commit | bdcd73fdb80975a79e0f9a08173d35ea09d378fa (patch) | |
tree | 86ee8c78623a78ec4b4290532e6c7d04bfa71273 | |
parent | 85e3f956adea7d065c7773891ea48f0f968a4d14 (diff) | |
download | NetworkManager-fg/cannot_assign_ipv6-rh1462260.tar.gz |
device: avoid touching IPv6 on "external" connections without IPv6 conffg/cannot_assign_ipv6-rh1462260
When a device managed by NetworkManager is configured manually (adding
ip addresses), NetworkManager will track the device configuration with
an in-memory only config, marking the device as "external".
Devices marked external should be just tracked but left untouched.
This does not happens on current code base: if an ipv4 address is added,
NM generates the in-memory connection, marking the ipv6.method as "ignore".
While activating the connection, NM will process the IPv6 "ignore" method:
this implies leaving the IPv6LL address generation to the kernel. To
trigger this NM will disable/enable IPv6 on the interface.
This not only may change the device configuration but may cause also
a potential race with an external IPv6 assignment on the device.
NetworkManager should do nothing to IPv6 when method is "ignore" and
connection is marked as "external": this commit fixes this behavior.
Note that if/once an IPv6 address is externally added, IPv6 method in the
tracked connection is changed to "manual" and a link local address will be
generated if needed.
https://bugzilla.redhat.com/show_bug.cgi?id=1462260
-rw-r--r-- | src/devices/nm-device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 79f67760ae..d4193384ba 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -7765,7 +7765,8 @@ act_stage3_ip6_config_start (NMDevice *self, method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP6_CONFIG); if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0) { - if (!priv->master) { + if ( !priv->master + && !nm_device_sys_iface_state_is_external (self)) { gboolean old_nm_ipv6ll = priv->nm_ipv6ll; /* When activating an IPv6 'ignore' connection we need to revert back |