mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-07 17:17:44 +03:00
resolved: refresh resolv.conf files when link goes away
This might have the effect that some DNS server or search domain
disappears, hence rewrite the relevant files.
See: #27543
(cherry picked from commit 562f7bde8872b4fd03db11bf25c9dd294fd2c186)
(cherry picked from commit 72806073770393982a50aed54c40164105c9bf14)
(cherry picked from commit 1de3aa4ec9
)
This commit is contained in:
parent
15c33cb709
commit
cea9e1619a
@ -93,6 +93,9 @@ static int manager_process_link(sd_netlink *rtnl, sd_netlink_message *mm, void *
|
||||
log_debug("Removing link %i/%s", l->ifindex, l->ifname);
|
||||
link_remove_user(l);
|
||||
link_free(l);
|
||||
|
||||
/* Make sure DNS servers are dropped from written resolv.conf if their link goes away */
|
||||
manager_write_resolv_conf(m);
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user