]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If we get another carrier event during the poll for IFF_UP, cancel the poll.
authorRoy Marples <roy@marples.name>
Tue, 9 Dec 2014 09:45:56 +0000 (09:45 +0000)
committerRoy Marples <roy@marples.name>
Tue, 9 Dec 2014 09:45:56 +0000 (09:45 +0000)
dhcpcd.c

index cb51141f8af2fd03a8dbfd3c52d8b08075bccca3..734d8c69773773d774fb44ff93ed61edf097015b 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -586,6 +586,10 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *ctx, int carrier, unsigned int flags,
                ifp->flags = flags;
        }
 
+       /* If we here, we don't need to poll for IFF_UP any longer
+        * if generated by a kernel event. */
+       eloop_timeout_delete(ifp->ctx->eloop, dhcpcd_pollup, ifp);
+
        if (carrier == LINK_UNKNOWN) {
                if (errno != ENOTTY) /* For example a PPP link on BSD */
                        syslog(LOG_ERR, "%s: carrier_status: %m", ifname);