Module Name: src
Committed By: plunky
Date: Sat Apr 4 17:10:20 UTC 2009
Modified Files:
src/sbin/ifconfig: ifconfig.c
Log Message:
Because the IFF_NOARP flag is a negative option it needs to be negated
when being applied from the "arp" option which itself is positive.
problem demonstrated by
# ifconfig tap3 create
# ifconfig tap3
tap3: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: f2:0b:a4:7f:44:03
media: Ethernet autoselect
# ifconfig tap3 arp
# ifconfig tap3
tap3: flags=8882<BROADCAST,NOARP,SIMPLEX,MULTICAST> mtu 1500
address: f2:0b:a4:7f:44:03
media: Ethernet autoselect
# ifconfig tap3 -arp
# ifconfig tap3
tap3: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: f2:0b:a4:7f:44:03
media: Ethernet autoselect
# ifconfig tap3 destroy
#
To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/sbin/ifconfig/ifconfig.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/ifconfig/ifconfig.c
diff -u src/sbin/ifconfig/ifconfig.c:1.214 src/sbin/ifconfig/ifconfig.c:1.215
--- src/sbin/ifconfig/ifconfig.c:1.214 Sun Jan 18 00:24:29 2009
+++ src/sbin/ifconfig/ifconfig.c Sat Apr 4 17:10:19 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ifconfig.c,v 1.214 2009/01/18 00:24:29 lukem Exp $ */
+/* $NetBSD: ifconfig.c,v 1.215 2009/04/04 17:10:19 plunky Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1983, 1993\
The Regents of the University of California. All rights reserved.");
-__RCSID("$NetBSD: ifconfig.c,v 1.214 2009/01/18 00:24:29 lukem Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.215 2009/04/04 17:10:19 plunky Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -131,7 +131,7 @@
static void usage(void);
static const struct kwinst ifflagskw[] = {
- IFKW("arp", IFF_NOARP)
+ IFKW("arp", -IFF_NOARP)
, IFKW("debug", IFF_DEBUG)
, IFKW("link0", IFF_LINK0)
, IFKW("link1", IFF_LINK1)