diff options
author | Francesco Giudici <fgiudici@redhat.com> | 2017-05-16 15:00:12 +0200 |
---|---|---|
committer | Francesco Giudici <fgiudici@redhat.com> | 2017-06-09 17:38:53 +0200 |
commit | 8099a8be748ca7dc2a77d68efce874a3fafad20c (patch) | |
tree | a721ea4827a7ecd21b9029f9feedc972c25510eb | |
parent | c994015d7f85b50eae22b405da60572da7cde273 (diff) | |
download | NetworkManager-fg/ipv6_add_sync.tar.gz |
fixup! device: always sync IPv6 address removal between platform and configfg/ipv6_add_sync
-rw-r--r-- | src/devices/nm-device.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index cce94b0887..351c11da25 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -10919,10 +10919,13 @@ device_ipx_changed (NMPlatform *platform, priv->dad6_failed_addrs = g_slist_append (priv->dad6_failed_addrs, g_memdup (addr, sizeof (NMPlatformIP6Address))); } - /* We should remove addresses we generated also if the device has become - * unmanaged: this is required in order to avoid races when the device is - * quickly set back to managed */ - if ((change_type == NM_PLATFORM_SIGNAL_REMOVED) && priv->ip6_config) + /* We should remove addresses we generated also if the device is no more + * managed: this is required in order to avoid races when the device is + * assigned an IPv6 address and while it is still tentative it is quickly + * set back to managed */ + if ( (priv->state < NM_DEVICE_STATE_PREPARE) + && (change_type == NM_PLATFORM_SIGNAL_REMOVED) + && priv->ip6_config) nm_ip6_config_search_and_del_address (priv->ip6_config, addr); /* fall through */ case NMP_OBJECT_TYPE_IP6_ROUTE: |