]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: Drop IPv6LL address when link is down 3276/head
authorSusant Sahani <ssahani@redhat.com>
Wed, 18 May 2016 12:49:40 +0000 (18:19 +0530)
committerSusant Sahani <ssahani@redhat.com>
Wed, 18 May 2016 12:49:40 +0000 (18:19 +0530)
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

src/network/networkd-address.c

index 976f333f7e643d75d07a3de98643dc54f75c800d..367c340e08f9da5c140f0468abb9030c2ae3e514 100644 (file)
@@ -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);