network: disable IPv4ACD when the address request is cancelled
If an address with IPv4ACD is requested, then sd_ipv4acd instance for
the address is configured. If the request is cancelled, we should
also disable the IPv4ACD instance.
Note, if the address is already configured, the IPv4ACD instance for the
address will be removed when the address is removed. See address_drop().
(cherry picked from commit c5bf6bac23)
This commit is contained in:
committed by
Luca Boccassi
parent
773592d77d
commit
ae6dc22b40
@@ -1335,6 +1335,9 @@ int address_remove_and_cancel(Address *address, Link *link) {
|
||||
if (waiting || (address->link && address_exists(address)))
|
||||
return address_remove(address, link);
|
||||
|
||||
/* Otherwise, the address should be already gone or not configured yet. */
|
||||
ipv4acd_detach(link, address);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1095,8 +1095,12 @@ int link_drop_requests(Link *link, NetworkConfigSource source) {
|
||||
if (source >= 0 && address->source != source)
|
||||
continue;
|
||||
|
||||
if (remove && address_get(link, address, /* ret= */ NULL) < 0)
|
||||
RET_GATHER(ret, address_remove(address, link));
|
||||
if (address_get(link, address, /* ret= */ NULL) < 0) {
|
||||
if (remove)
|
||||
RET_GATHER(ret, address_remove(address, link));
|
||||
else
|
||||
ipv4acd_detach(link, address);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case REQUEST_TYPE_NEIGHBOR: {
|
||||
|
||||
Reference in New Issue
Block a user