summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@redhat.com>2016-05-18 18:19:40 +0530
committerSusant Sahani <ssahani@redhat.com>2016-05-18 18:19:40 +0530
commitf150100ad43125682cfd01da4cb92ffc8eb17a09 (patch)
treeb012b08e4d10c0ae31485972b680f58e7a0fe013 /src/network
parent4e080f502a5cd6e538a03472070aae8a730c15e9 (diff)
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
Diffstat (limited to 'src/network')
-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);