diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-05-26 19:05:31 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-05-28 18:38:27 +0200 |
commit | 49305559dc2a1244a3c9c80e9cec2a0d0c25960d (patch) | |
tree | 457aaa9f5cd0d2b5a4150784646f97bc74b0c113 | |
parent | 1d6b9953ad3b7cbfe593da06aac435c95e562a30 (diff) | |
download | NetworkManager-49305559dc2a1244a3c9c80e9cec2a0d0c25960d.tar.gz |
core: clear IPv6 kernel token when deactivating a devicebg/ipv6-kernel-token-rh1819680
Clear the IPv6 kernel token when deactivating a device.
-rw-r--r-- | src/devices/nm-device.c | 2 | ||||
-rw-r--r-- | src/platform/nm-platform.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 1a3efaefec..9b018ccc8c 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -15730,11 +15730,13 @@ nm_device_cleanup (NMDevice *self, NMDeviceStateReason reason, CleanupType clean /* Take out any entries in the routing table and any IP address the device had. */ if (ifindex > 0) { NMPlatform *platform = nm_device_get_platform (self); + NMUtilsIPv6IfaceId iid = { }; nm_platform_ip_route_flush (platform, AF_UNSPEC, ifindex); nm_platform_ip_address_flush (platform, AF_UNSPEC, ifindex); nm_platform_tfilter_sync (platform, ifindex, NULL); nm_platform_qdisc_sync (platform, ifindex, NULL); + set_ipv6_token (self, iid, "::"); } } diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 5ac788f73f..b7a43a0ea1 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -1572,7 +1572,6 @@ nm_platform_link_set_ipv6_token (NMPlatform *self, int ifindex, NMUtilsIPv6Iface _CHECK_SELF (self, klass, FALSE); g_return_val_if_fail (ifindex >= 0, FALSE); - g_return_val_if_fail (iid.id, FALSE); if (klass->link_set_token) return klass->link_set_token (self, ifindex, iid); |