From fbae1f3873b31da041c58cefaa3667fe2282a629 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 23 Sep 2020 13:14:06 +0100 Subject: [PATCH] if: Always warn about ignored interfaces. --- src/if.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/if.c b/src/if.c index 2907cc0e..802fe461 100644 --- a/src/if.c +++ b/src/if.c @@ -399,7 +399,7 @@ if_check_arphrd(struct interface *ifp, unsigned int active, bool if_noconf) break; case ARPHRD_LOOPBACK: case ARPHRD_PPP: - if (if_noconf) { + if (if_noconf && active) { logdebugx("%s: ignoring due to interface type and" " no config", ifp->name); @@ -538,8 +538,11 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs, !if_hasconf(ctx, spec.devname)); /* Don't allow some reserved interface names unless explicit. */ - if (if_noconf && if_ignore(ctx, spec.devname)) + if (if_noconf && if_ignore(ctx, spec.devname)) { + logdebugx("%s: ignoring due to interface type and" + " no config", spec.devname); active = IF_INACTIVE; + } ifp = calloc(1, sizeof(*ifp)); if (ifp == NULL) { @@ -584,7 +587,7 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs, case IFT_LOOP: /* FALLTHROUGH */ case IFT_PPP: /* Don't allow unless explicit */ - if (if_noconf) { + if (if_noconf && active) { logdebugx("%s: ignoring due to" " interface type and" " no config", -- 2.47.2