device: don't try to add IPv6LL address to a down interface

When the interface is down DAD failures becomes irrelevant and we
shouldn't try to add a link-local address even if the configuration
contains other IPv6 addresses.
This commit is contained in:
Beniamino Galvani 2019-03-08 18:42:19 +01:00
parent d86dd9a0fe
commit 72385f363c

View file

@ -12892,6 +12892,7 @@ queued_ip_config_change (NMDevice *self, int addr_family)
if (!IS_IPv4) {
NMPlatform *platform;
GSList *dad6_failed_addrs, *iter;
const NMPlatformLink *pllink;
dad6_failed_addrs = g_steal_pointer (&priv->dad6_failed_addrs);
@ -12900,7 +12901,8 @@ queued_ip_config_change (NMDevice *self, int addr_family)
&& priv->ifindex > 0
&& !nm_device_sys_iface_state_is_external (self)
&& (platform = nm_device_get_platform (self))
&& nm_platform_link_get (platform, priv->ifindex)) {
&& (pllink = nm_platform_link_get (platform, priv->ifindex))
&& (pllink->n_ifi_flags & IFF_UP)) {
gboolean need_ipv6ll = FALSE;
NMNDiscConfigMap ndisc_config_changed = NM_NDISC_CONFIG_NONE;