From: Roy Marples Date: Wed, 17 Jun 2020 10:25:58 +0000 (+0100) Subject: dhcpcd: preserve the STARTED option when reloading options X-Git-Tag: v9.1.3~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a399ac6e6fea2afc5af0eea54fff810752728ca;p=thirdparty%2Fdhcpcd.git dhcpcd: preserve the STARTED option when reloading options This avoids the truncated read when the launcher process exists after the main process handles SIGHUP. --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 18e373c9..281ab5e4 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1299,7 +1299,9 @@ reload_config(struct dhcpcd_ctx *ctx) if ((ifo = read_config(ctx, NULL, NULL, NULL)) == NULL) return; add_options(ctx, NULL, ifo, ctx->argc, ctx->argv); - /* We need to preserve these two options. */ + /* We need to preserve these options. */ + if (ctx->options & DHCPCD_STARTED) + ifo->options |= DHCPCD_STARTED; if (ctx->options & DHCPCD_MASTER) ifo->options |= DHCPCD_MASTER; if (ctx->options & DHCPCD_DAEMONISED)