parent
02affb4e6a
commit
c69305ff4f
|
@ -514,13 +514,12 @@ static void link_free(Link *link) {
|
|||
sd_lldp_unref(link->lldp);
|
||||
free(link->lldp_file);
|
||||
|
||||
ndisc_flush(link);
|
||||
|
||||
sd_ipv4ll_unref(link->ipv4ll);
|
||||
sd_dhcp6_client_unref(link->dhcp6_client);
|
||||
sd_ndisc_unref(link->ndisc);
|
||||
|
||||
set_free_free(link->ndisc_rdnss);
|
||||
set_free_free(link->ndisc_dnssl);
|
||||
|
||||
if (link->manager)
|
||||
hashmap_remove(link->manager->links, INT_TO_PTR(link->ifindex));
|
||||
|
||||
|
@ -2427,6 +2426,8 @@ static int link_drop_config(Link *link) {
|
|||
return r;
|
||||
}
|
||||
|
||||
ndisc_flush(link);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -690,3 +690,12 @@ void ndisc_vacuum(Link *link) {
|
|||
link_dirty(link);
|
||||
}
|
||||
}
|
||||
|
||||
void ndisc_flush(Link *link) {
|
||||
assert(link);
|
||||
|
||||
/* Removes all RDNSS and DNSSL entries, without exception */
|
||||
|
||||
link->ndisc_rdnss = set_free_free(link->ndisc_rdnss);
|
||||
link->ndisc_dnssl = set_free_free(link->ndisc_dnssl);
|
||||
}
|
||||
|
|
|
@ -37,3 +37,4 @@ static inline char* NDISC_DNSSL_DOMAIN(const NDiscDNSSL *n) {
|
|||
|
||||
int ndisc_configure(Link *link);
|
||||
void ndisc_vacuum(Link *link);
|
||||
void ndisc_flush(Link *link);
|
||||
|
|
Loading…
Reference in New Issue