From 1609344eda7f8c35d69097562b4a3dae2d34706c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 20 Jun 2018 13:23:51 +0200 Subject: [PATCH] device: only check for IPv6 DAD and link-local address on actively managed devices 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" ends up being TRUE, which results in a call to check_and_add_ipv6ll_addr() and later 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 NetworkManager shouldn't touch it. https://bugzilla.redhat.com/show_bug.cgi?id=1593210 (cherry picked from commit 890c7486430e9448036773b49e493af7f9977b31) --- src/devices/nm-device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 51c15bcc1..5a5cb50e9 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -12266,7 +12266,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;