From: Roy Marples Date: Sat, 23 May 2015 13:09:22 +0000 (+0000) Subject: Only blank out wait options if we are parsing a valid block for us. X-Git-Tag: v6.9.1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d42067b81ec380b16639cda2f94b67e17c8c1c7a;p=thirdparty%2Fdhcpcd.git Only blank out wait options if we are parsing a valid block for us. Another fix for [1972d664c2]. --- diff --git a/if-options.c b/if-options.c index 859a143a..e231d351 100644 --- a/if-options.c +++ b/if-options.c @@ -2271,6 +2271,7 @@ read_config(struct dhcpcd_ctx *ctx, ldop = edop = NULL; skip = have_profile = new_block = 0; + had_block = ifname == NULL ? 1 : 0; while ((line = get_line(&buf, &buflen, fp))) { option = strsep(&line, " \t"); if (line) @@ -2283,7 +2284,7 @@ read_config(struct dhcpcd_ctx *ctx, *(p - 1) != '\\') *p-- = '\0'; } - if (new_block) { + if (skip == 0 && new_block) { had_block = 1; new_block = 0; ifo->options &= ~DHCPCD_WAITOPTS;