Ignored interfaces should be ignored, wether they are IFF_UP or not.

For example eon0 is always up after boot, but completely useless.
This commit is contained in:
martin 2006-09-29 10:37:49 +00:00
parent 3da83175e0
commit f944aa66d2
1 changed files with 11 additions and 10 deletions

View File

@ -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;