diff options
| author | Roy Marples <roy@marples.name> | 2020-03-17 07:57:03 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-03-17 07:57:03 +0000 |
| commit | 0f157e3c63a51c92fe547e5038bd17778c425d37 (patch) | |
| tree | 120aca32cf1f8ef45cfe85b9a34179b3565d2fed /src/dhcpcd.c | |
| parent | 303500c5365369ce8b8baed73d401b17b85544d1 (diff) | |
| download | dhcpcd-0f157e3c63a51c92fe547e5038bd17778c425d37.tar.xz | |
dhcpcd: Improve error when interface does not exist vs invalid config
Diffstat (limited to 'src/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 8 |
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) { |
