summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-03-17 07:57:03 +0000
committerRoy Marples <roy@marples.name>2020-03-17 07:57:03 +0000
commit0f157e3c63a51c92fe547e5038bd17778c425d37 (patch)
tree120aca32cf1f8ef45cfe85b9a34179b3565d2fed
parent303500c5365369ce8b8baed73d401b17b85544d1 (diff)
downloaddhcpcd-0f157e3c63a51c92fe547e5038bd17778c425d37.tar.xz
dhcpcd: Improve error when interface does not exist vs invalid config
-rw-r--r--src/dhcpcd.c8
1 files changed, 5 insertions, 3 deletions
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) {