diff options
author | Thomas Haller <thaller@redhat.com> | 2018-06-20 12:46:02 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-06-29 16:38:50 +0200 |
commit | 3fcdba1a19176bfb3595ef4c2b948f604af5dd54 (patch) | |
tree | eacc5862a5929191da338bc921326659c36f2a46 | |
parent | 63cf5bd249ba3d8674003560515e2ef6a27a5efc (diff) | |
download | NetworkManager-3fcdba1a19176bfb3595ef4c2b948f604af5dd54.tar.gz |
device: split handling for dad6_failed_addrs and dad6_ip6_config in queued_ip_config_change()
There is no change in behavior, however don't handle dad6_failed_addrs
and dad6_ip6_config in the same block.
While both parts are related to IPv6 DAD, they do something rather
different:
- the first block, checks all candidates from dad6_failed_addrs whether
they actually indicate DAD failed, and handles them by notifying
NMNDisc about failed addresses.
- the second block, checks whether we have now all addresses from
dad6_ip6_config that we are waiting for.
Split the blocks.
-rw-r--r-- | src/devices/nm-device.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 0e9c9e80cb..61033b7cd5 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -12262,9 +12262,7 @@ static gboolean queued_ip_config_change (NMDevice *self, int addr_family) { NMDevicePrivate *priv; - gboolean need_ipv6ll = FALSE; const gboolean IS_IPv4 = (addr_family == AF_INET); - NMPlatform *platform; g_return_val_if_fail (NM_IS_DEVICE (self), G_SOURCE_REMOVE); @@ -12297,6 +12295,9 @@ queued_ip_config_change (NMDevice *self, int addr_family) } if (!IS_IPv4) { + NMPlatform *platform; + gboolean need_ipv6ll = FALSE; + if ( priv->state < NM_DEVICE_STATE_DEACTIVATING && (platform = nm_device_get_platform (self)) && nm_platform_link_get (platform, priv->ifindex)) { @@ -12337,7 +12338,9 @@ queued_ip_config_change (NMDevice *self, int addr_family) g_slist_free_full (priv->dad6_failed_addrs, (GDestroyNotify) nmp_object_unref); priv->dad6_failed_addrs = NULL; } + } + if (!IS_IPv4) { /* Check if DAD is still pending */ if ( priv->ip6_state == IP_CONF && priv->dad6_ip6_config |