# HG changeset patch # User Roy Marples # Date 1598772524 -3600 # Node ID f6d641a87e0a619c8425d3b847cf99d81bb4354b # Parent edcbeacf2225a2348898ed1ba867850cc480909e dhcpcd: init new interfaces from route(4) overflow This ensures that any newly active ones have an options structure. diff -r edcbeacf2225 -r f6d641a87e0a src/dhcpcd.c --- a/src/dhcpcd.c Sun Aug 30 08:03:01 2020 +0100 +++ b/src/dhcpcd.c Sun Aug 30 08:28:44 2020 +0100 @@ -1153,6 +1153,16 @@ } #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 @@ 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);