From a7c97d58dbeef80c328dc1ff24db29aae7485078 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 16 Oct 2017 16:27:55 +0200 Subject: [PATCH] device: check captured IPv6 configuration in check_and_add_ipv6ll_addr() check_and_add_ipv6ll_addr() checks whether a link-local address is already present in priv->ip6_config and if so, it returns with no action. priv->ip6_config is only updated after a merge-and-apply or (in an idle source) when the external configuration changes and so there is no guarantee that the addresses there are up-to-date. priv->ext_ip6_config_captured should be checked instead, because it is updated from platform right before starting the generation of a link-local address. Note that also linklocal6_start() already checks the captured external configuration rather than priv->ip6_config. https://bugzilla.redhat.com/show_bug.cgi?id=1500350 --- src/devices/nm-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 485d695167..f64173d5c3 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -7115,11 +7115,11 @@ check_and_add_ipv6ll_addr (NMDevice *self) if (priv->nm_ipv6ll == FALSE) return; - if (priv->ip6_config) { + if (priv->ext_ip6_config_captured) { NMDedupMultiIter ipconf_iter; const NMPlatformIP6Address *addr; - nm_ip_config_iter_ip6_address_for_each (&ipconf_iter, priv->ip6_config, &addr) { + nm_ip_config_iter_ip6_address_for_each (&ipconf_iter, priv->ext_ip6_config_captured, &addr) { if ( IN6_IS_ADDR_LINKLOCAL (&addr->address) && !(addr->n_ifa_flags & IFA_F_DADFAILED)) { /* Already have an LL address, nothing to do */