diff options
author | Philipp Buehler <pb@cvs.openbsd.org> | 2004-06-26 04:00:06 +0000 |
---|---|---|
committer | Philipp Buehler <pb@cvs.openbsd.org> | 2004-06-26 04:00:06 +0000 |
commit | 1f368793a92adc571d4096c441f5bd2d51b8966a (patch) | |
tree | 10577133c965595878e4889685befe453d3fd938 /sbin/ifconfig/ifconfig.c | |
parent | 2a130c553e5b3450772f5b74258d9548f6c74ca3 (diff) |
ignore IFGROUP errs in ifconfig -a for "too old" kernels right now
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 0c56a40e015..701f47a9a12 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.105 2004/06/26 03:12:08 pb Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.106 2004/06/26 04:00:05 pb Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -77,7 +77,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; #else -static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.105 2004/06/26 03:12:08 pb Exp $"; +static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.106 2004/06/26 04:00:05 pb Exp $"; #endif #endif /* not lint */ @@ -2592,7 +2592,10 @@ getifgroups(void) strlcpy(ifg.if_name, name, IFNAMSIZ); if (ioctl(s, SIOCGIFGROUP, (caddr_t)&ifg) == -1) - err(1, "SIOCGIFGROUP"); + if (errno == EINVAL || errno == ENOTTY) + return; + else + err(1, "SIOCGIFGROUP"); len = ifg.ifg_len; ifg.ifg_groups = (struct ifgroup *)calloc(len / sizeof(struct ifgroup), |