From: Roy Marples Date: Fri, 19 Jun 2020 08:36:55 +0000 (+0100) Subject: dhcpcd: Only poll after mac randomisation X-Git-Tag: v9.1.3~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50e8685ae6f470cb40cd7979e2242315e673d4b8;p=thirdparty%2Fdhcpcd.git dhcpcd: Only poll after mac randomisation That will cause a delay and poll instantly rather than an initial wait. --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index c7176d93..4907523e 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -878,7 +878,8 @@ dhcpcd_startinterface(void *arg) case LINK_UNKNOWN: /* No media state available. * Loop until both IFF_UP and IFF_RUNNING are set */ - if_pollinit(ifp); + if (ifo->poll == 0) + if_pollinit(ifp); return; } } @@ -969,9 +970,6 @@ dhcpcd_prestartinterface(void *arg) struct dhcpcd_ctx *ctx = ifp->ctx; bool anondown; - if (ifp->options->poll != 0) - if_pollinit(ifp); - if (ifp->carrier == LINK_DOWN && ifp->options->options & DHCPCD_ANONYMOUS && ifp->flags & IFF_UP) @@ -992,6 +990,9 @@ dhcpcd_prestartinterface(void *arg) logerr(__func__); } + if (ifp->options->poll != 0) + if_pollinit(ifp); + dhcpcd_startinterface(ifp); }