summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2016-05-20 18:54:49 +0200
committerTom Gundersen <teg@jklm.no>2016-05-20 18:54:49 +0200
commite506f43666e80a931e0ed6a66dd6f3bf76fbfaf2 (patch)
treeb85fbf484e283ba34e7477886de5c9fe3f193f75 /src
parentf9e26ecc48dc87f51e75ce8aa58ef9bdae8ce0f0 (diff)
parentf150100ad43125682cfd01da4cb92ffc8eb17a09 (diff)
Merge pull request #3276 from ssahani/issue-3264
networkd: Drop IPv6LL address when link is down.
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-address.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 976f333f7e..367c340e08 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -98,6 +98,9 @@ void address_free(Address *address) {
if (address->link) {
set_remove(address->link->addresses, address);
set_remove(address->link->addresses_foreign, address);
+
+ if (in_addr_equal(AF_INET6, &address->in_addr, (const union in_addr_union *) &address->link->ipv6ll_address))
+ memzero(&address->link->ipv6ll_address, sizeof(struct in6_addr));
}
free(address);