From: Roy Marples Date: Wed, 7 May 2014 09:22:26 +0000 (+0000) Subject: Run NOCARRIER before dropping protocols. X-Git-Tag: v6.4.0~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4afb9c4336a8a1bb9b0415a8c4aedf038ae47c5c;p=thirdparty%2Fdhcpcd.git Run NOCARRIER before dropping protocols. --- 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) {