From: Susant Sahani Date: Wed, 18 May 2016 12:49:40 +0000 (+0530) Subject: networkd: Drop IPv6LL address when link is down X-Git-Tag: v230~10^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f150100ad43125682cfd01da4cb92ffc8eb17a09;p=thirdparty%2Fsystemd.git networkd: Drop IPv6LL address when link is down Now we are not dropping the IPv6LL address when link is down. So next time when link is up and before kernel acquired this address we are using the old address. When the link is down kernel tells us that this address is no longer valid . Let's remove this address and again when kernel tells us that the address is added let's use it. fixes #3264 --- diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 976f333f7e6..367c340e08f 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);