diff options
| author | Roy Marples <roy@marples.name> | 2013-06-12 18:24:16 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2013-06-12 18:24:16 +0000 |
| commit | 6fb316a6688ffc37388063e0a74b334489ccadfd (patch) | |
| tree | 11ff75ab3a3dad7953417385e0dbc89d3a611758 /dhcpcd.c | |
| parent | 6ce65558f42ff51b7549c62e8e2a751fa446f1a7 (diff) | |
| download | dhcpcd-6fb316a6688ffc37388063e0a74b334489ccadfd.tar.xz | |
Fix a crash with departing interfaces.
Fix more needless spam when an interface departs.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -282,6 +282,8 @@ stop_interface(struct interface *ifp) dhcp_drop(ifp, "STOP"); dhcp_close(ifp); eloop_timeout_delete(NULL, ifp); + if (ifp->options->options & DHCPCD_DEPARTED) + script_runreason(ifp, "DEPARTED"); free_interface(ifp); if (!(options & (DHCPCD_MASTER | DHCPCD_TEST))) exit(EXIT_FAILURE); @@ -470,7 +472,7 @@ static void handle_link(__unused void *arg) { - if (manage_link(linkfd) == -1) + if (manage_link(linkfd) == -1 && errno != ENXIO && errno != ENODEV) syslog(LOG_ERR, "manage_link: %m"); } @@ -526,8 +528,8 @@ handle_interface(int action, const char *ifname) if (action == -1) { ifp = find_interface(ifname); if (ifp != NULL) { + ifp->options->options |= DHCPCD_DEPARTED; stop_interface(ifp); - script_runreason(ifp, "DEPARTED"); } return; } |
