From: Roy Marples Date: Tue, 17 Mar 2020 07:57:03 +0000 (+0000) Subject: dhcpcd: Improve error when interface does not exist vs invalid config X-Git-Tag: v9.0.0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afd77128956be646c7ccaa44f68c46a2641fd494;p=thirdparty%2Fdhcpcd.git dhcpcd: Improve error when interface does not exist vs invalid config --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index bf5d74c3..bd2556ea 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -2173,9 +2173,11 @@ printpidfile: goto exit_failure; } for (i = 0; i < ctx.ifc; i++) { - if ((ifp = if_find(ctx.ifaces, ctx.ifv[i])) == NULL || - !ifp->active) - logerrx("%s: interface not found or invalid", + if ((ifp = if_find(ctx.ifaces, ctx.ifv[i])) == NULL) + logerrx("%s: interface not found", + ctx.ifv[i]); + else if (!ifp->active) + logerrx("%s: interface has an invalid configuration", ctx.ifv[i]); } TAILQ_FOREACH(ifp, ctx.ifaces, next) {