From f944aa66d2573983f567e4a3df345f727dd5490a Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 29 Sep 2006 10:37:49 +0000 Subject: [PATCH] Ignored interfaces should be ignored, wether they are IFF_UP or not. For example eon0 is always up after boot, but completely useless. --- distrib/utils/sysinst/net.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/distrib/utils/sysinst/net.c b/distrib/utils/sysinst/net.c index ea8e51e68506..dccd3400ba4b 100644 --- a/distrib/utils/sysinst/net.c +++ b/distrib/utils/sysinst/net.c @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.111 2006/09/29 09:56:04 martin Exp $ */ +/* $NetBSD: net.c,v 1.112 2006/09/29 10:37:49 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -266,6 +266,16 @@ get_ifconfig_info(void) fl = strtoul(cp + 1, &cp, 16); if (*cp != '<') break; + + for (ignore = ignored_if_names; *ignore != NULL; ignore++) { + size_t len = strlen(*ignore); + if (strncmp(t, *ignore, len) == 0 && + isdigit((unsigned char)t[len])) + break; + } + if (*ignore != NULL) + continue; + if (fl & IFF_UP) { /* This interface might be connected to the server */ cp = strchr(t, ':'); @@ -277,15 +287,6 @@ get_ifconfig_info(void) net_up = cp; } - for (ignore = ignored_if_names; *ignore != NULL; ignore++) { - size_t len = strlen(*ignore); - if (strncmp(t, *ignore, len) == 0 && - isdigit((unsigned char)t[len])) - break; - } - if (*ignore != NULL) - continue; - cp = strchr(t, ':'); if (cp == NULL) break;