summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-06-20 13:23:51 +0200
committerThomas Haller <thaller@redhat.com>2018-06-26 18:18:04 +0200
commita9ba0402bd775b19628d361ae3b269481ed19147 (patch)
tree4692aa62338118b22862f84f70b846f1e9f69f48
parentb2c18b62c3bd8a002d5a37faf3ae86040284584e (diff)
downloadNetworkManager-th/device-dad-handling-rh1593210.tar.gz
device: only check for IPv6 DAD and link-local address on actively managed devicesth/device-dad-handling-rh1593210
In device_ipx_changed() we only keep track of dad6_failed_addrs addresses if the device's state is > DISCONNECTED. For the same reason, we should also do that in queued_ip_config_change(). But it's worse. If the device is in state disconnected, and the user externally adds IPv6 addresses, we will end up in queued_ip_config_change(). It is easily possible that need_ipv6ll evaluates to TRUE, which results in a call to check_and_add_ipv6ll_addr() and possibly ip_config_merge_and_apply (self, AF_INET6, TRUE); This in turn will modify the IP configuration on the device, although the device may be externally managed and NM shouldn't touch it. https://bugzilla.redhat.com/show_bug.cgi?id=1593210
-rw-r--r--src/devices/nm-device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 387c76833b..91ddc8a24c 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -12296,7 +12296,9 @@ queued_ip_config_change (NMDevice *self, int addr_family)
dad6_failed_addrs = g_steal_pointer (&priv->dad6_failed_addrs);
- if ( priv->state < NM_DEVICE_STATE_DEACTIVATING
+ if ( priv->state > NM_DEVICE_STATE_DISCONNECTED
+ && priv->state < NM_DEVICE_STATE_DEACTIVATING
+ && !nm_device_sys_iface_state_is_external (self)
&& (platform = nm_device_get_platform (self))
&& nm_platform_link_get (platform, priv->ifindex)) {
gboolean need_ipv6ll = FALSE;