Subject: bin/21604: ifconfig -b tests wrong interface flag
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lukem@netbsd.org>
List: netbsd-bugs
Date: 05/17/2003 10:28:26
>Number:         21604
>Category:       bin
>Synopsis:       ifconfig -b  tests wrong interface flag
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 17 00:29:02 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Luke Mewburn
>Release:        NetBSD 1.6T
>Organization:
>Environment:
System: NetBSD argo.mewburn.net 1.6T NetBSD 1.6T (ARGO from GENERIC-$Revision: 1.558 $) #0: Wed May 14 19:27:36 EST 2003 lukem@argo.mewburn.net:/var/obj/i386/usr/src/sys/arch/i386/compile/ARGO i386
Architecture: i386
Machine: i386
>Description:
	"ifconfig -l -b" is documented as:
		 -b (only list broadcast interfaces)

	However, this is implemented by skipping interfaces with the
	POINTTOPOINT or LOOPBACK flags set, not by only including
	interfaces with the BROADCAST flag set.  This means we get
	interfaces such as "stripN" in the "-b" output.

>How-To-Repeat:
	Run "ifconfig -lb" on a GENERIC system and notice that strip0
	appears.

>Fix:
	Change the tests in ifconfig(8) from
		(ifa_flags & IFF_POINTTOPOINT|IFF_LOOPBACK)
	to
		! (ifa_flags & IFF_BROADCAST)
	?
>Release-Note:
>Audit-Trail:
>Unformatted: