mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
Fix dhclient to properly exit and teardown the configured lease when
link is lost. devd will start a new dhclient instance when link is restored. PR: bin/166656 Submitted by: Peter Jeremy (mostly) Reviewed by: brooks (earlier version from Peter) MFC after: 1 month
This commit is contained in:
parent
2f36da87cb
commit
83f745b8b9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239356
|
@ -278,6 +278,11 @@ routehandler(struct protocol *p)
|
|||
ifi->name);
|
||||
goto die;
|
||||
}
|
||||
if (!interface_link_status(ifi->name)) {
|
||||
warning("Interface %s is down, dhclient exiting",
|
||||
ifi->name);
|
||||
goto die;
|
||||
}
|
||||
break;
|
||||
case RTM_IFANNOUNCE:
|
||||
ifan = (struct if_announcemsghdr *)rtm;
|
||||
|
@ -316,6 +321,8 @@ routehandler(struct protocol *p)
|
|||
|
||||
die:
|
||||
script_init("FAIL", NULL);
|
||||
if (ifi->client->active)
|
||||
script_write_params("old_", ifi->client->active);
|
||||
if (ifi->client->alias)
|
||||
script_write_params("alias_", ifi->client->alias);
|
||||
script_go();
|
||||
|
|
Loading…
Reference in a new issue