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 #
This commit is contained in:
parent
4cfab35c9c
commit
bb505f700b
@ -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 status(const struct sockaddr_dl *, prop_dictionary_t,
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user