Subject: bin/9190: netstat(1) doesn't indicate 'B' for the BLACKHOLE flag.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ura@hiru.aoba.yokohama.jp>
List: netbsd-bugs
Date: 01/14/2000 11:36:41
>Number:         9190
>Category:       bin
>Synopsis:       netstat(1) doesn't indicate 'B' for the BLACKHOLE flag.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 14 11:36:00 2000
>Last-Modified:
>Originator:     URA Hiroshi
>Organization:
URA Hiroshi		E-mail: ura@hiru.aoba.yokohama.jp
>Release:        NetBSD-current (1999/12/17)
>Environment:
System: NetBSD uzuki.hiru.aoba.yokohama.jp 1.4P NetBSD 1.4P (UZUKI) #26: Fri Dec 17 18:55:34 JST 1999 root@:/usr/local/src/NetBSD/current/src/sys/arch/sparc/compile/UZUKI sparc


>Description:
  According to manual page, netstat(1) indicate 'B' for the BLACKHOLE flag
when the BLACKHOLE flag is set in route. But, netstat(1) doesn't indicate.

>How-To-Repeat:
  type the following command.
    # route add -net 192.168.0.0 -netmask 255.255.0.0 127.0.0.1 -blackhole

  and see results of following commands.
    # netstat -rn -f inet | grep 192.168

>Fix:
  Apply this patch.

Index: route.c
===================================================================
RCS file: /cvsroot/netbsd/basesrc/usr.bin/netstat/route.c,v
retrieving revision 1.45
diff -u -u -r1.45 route.c
--- route.c	2000/01/07 04:49:11	1.45
+++ route.c	2000/01/14 18:45:55
@@ -91,6 +91,7 @@
 	{ RTF_GATEWAY,	'G' },
 	{ RTF_HOST,	'H' },
 	{ RTF_REJECT,	'R' },
+	{ RTF_BLACKHOLE, 'B' },
 	{ RTF_DYNAMIC,	'D' },
 	{ RTF_MODIFIED,	'M' },
 	{ RTF_DONE,	'd' }, /* Completed -- for routing messages only */
>Audit-Trail:
>Unformatted: