From: Roy Marples Date: Sun, 30 Aug 2020 07:28:44 +0000 (+0100) Subject: dhcpcd: init new interfaces from route(4) overflow X-Git-Tag: v9.2.0~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5539a2f25ca0a956710430c316daf2f132675323;p=thirdparty%2Fdhcpcd.git dhcpcd: init new interfaces from route(4) overflow This ensures that any newly active ones have an options structure. --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index e96dcd30..00d6a6f9 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1153,6 +1153,16 @@ dhcpcd_setlinkrcvbuf(struct dhcpcd_ctx *ctx) } #endif +static void +dhcpcd_initprestartinterface(void *arg) +{ + struct interface *ifp = arg; + + dhcpcd_initstate(ifp, 0); + run_preinit(ifp); + dhcpcd_prestartinterface(ifp); +} + void dhcpcd_linkoverflow(struct dhcpcd_ctx *ctx) { @@ -1217,7 +1227,7 @@ dhcpcd_linkoverflow(struct dhcpcd_ctx *ctx) TAILQ_INSERT_TAIL(ctx->ifaces, ifp, next); if (ifp->active) eloop_timeout_add_sec(ctx->eloop, 0, - dhcpcd_prestartinterface, ifp); + dhcpcd_initprestartinterface, ifp); } free(ifaces);