summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-05-07 09:22:26 +0000
committerRoy Marples <roy@marples.name>2014-05-07 09:22:26 +0000
commit4afb9c4336a8a1bb9b0415a8c4aedf038ae47c5c (patch)
tree6120b9ee306e05a2bf8043d3c9651d9193278159 /dhcpcd.c
parent23f78f35c2d74d12644f91a0e28dcccb70e00af2 (diff)
downloaddhcpcd-4afb9c4336a8a1bb9b0415a8c4aedf038ae47c5c.tar.xz
Run NOCARRIER before dropping protocols.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index e378b2dc..ac953463 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -502,6 +502,7 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *ctx, int carrier, unsigned int flags,
if (ifp->carrier == LINK_UP)
syslog(LOG_INFO, "%s: carrier lost", ifp->name);
ifp->carrier = LINK_DOWN;
+ script_runreason(ifp, "NOCARRIER");
dhcp6_drop(ifp, "EXPIRE6");
ipv6nd_drop(ifp);
/* Don't blindly delete our knowledge of LL addresses.
@@ -510,7 +511,6 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *ctx, int carrier, unsigned int flags,
* do nothing. */
ipv6_free_ll_callbacks(ifp);
dhcp_drop(ifp, "EXPIRE");
- script_runreason(ifp, "NOCARRIER");
}
} else if (carrier == LINK_UP && ifp->flags & IFF_UP) {
if (ifp->carrier != LINK_UP) {