changeset 5481:8d0d468b6144 draft

if: Always warn about ignored interfaces.
author Roy Marples <roy@marples.name>
date Wed, 23 Sep 2020 13:14:06 +0100
parents 42eb9ab2e771
children 7f7968235543
files src/if.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/if.c	Wed Sep 23 09:59:47 2020 +0100
+++ b/src/if.c	Wed Sep 23 13:14:06 2020 +0100
@@ -399,7 +399,7 @@
 		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_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 @@
 			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",