mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-23 21:57:46 +03:00
network: also unref IPv4 ACD clients in Address objects
This should not change any behavior, as currently link_free_engines() is always called after all addresses are dropped. But the function may be used in other places in the future. So, let's also stop the clients.
This commit is contained in:
parent
1c49487284
commit
7abe175c00
@ -1449,6 +1449,15 @@ int ipv4_dad_stop(Link *link) {
|
||||
return r;
|
||||
}
|
||||
|
||||
void ipv4_dad_unref(Link *link) {
|
||||
Address *address;
|
||||
|
||||
assert(link);
|
||||
|
||||
SET_FOREACH(address, link->addresses)
|
||||
address->acd = sd_ipv4acd_unref(address->acd);
|
||||
}
|
||||
|
||||
int config_parse_broadcast(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
|
@ -65,6 +65,7 @@ int link_drop_foreign_addresses(Link *link);
|
||||
int link_serialize_addresses(Link *link, FILE *f);
|
||||
int link_deserialize_addresses(Link *link, const char *addresses);
|
||||
|
||||
void ipv4_dad_unref(Link *link);
|
||||
int ipv4_dad_stop(Link *link);
|
||||
int ipv4_dad_update_mac(Link *link);
|
||||
|
||||
|
@ -505,6 +505,8 @@ static void link_free_engines(Link *link) {
|
||||
link->dhcp6_lease = sd_dhcp6_lease_unref(link->dhcp6_lease);
|
||||
link->ndisc = sd_ndisc_unref(link->ndisc);
|
||||
link->radv = sd_radv_unref(link->radv);
|
||||
|
||||
ipv4_dad_unref(link);
|
||||
}
|
||||
|
||||
static Link *link_free(Link *link) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user