NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/52815: "route monitor" prints incorrect interface flag name



>Number:         52815
>Category:       bin
>Synopsis:       "route monitor" prints incorrect interface flag name
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 13 09:15:00 +0000 2017
>Originator:     Tomoyuki Sahara
>Release:        6.1.5
>Organization:
Internet Initiative Japan Inc.
>Environment:
NetBSD nir.tokyo.iiji.jp 6.1.5_PATCH NetBSD 6.1.5_PATCH (GENERIC) #0: Wed May 20 11:03:23 JST 2015  tsahara%nir.tokyo.iiji.jp@localhost:/usr/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
"monitor" mode of route(8) command prints all routing messages sent on the system.  For RTM_IFINFO, route(8) shows the flag name for each interface flags.  But it fails to spell "PROMISC" correctly.

>How-To-Repeat:
1. Set promiscuous flag of a network interface:

# tcpdump -ni wm0 &

2. Run "route" command in monitor mode:

# route monitor &

3. Emit RTM_IFINFO messages:

# ifconfig wm0 down

"route monitor" shows something like:

got message of size 152 on Wed Dec 13 17:26:21 2017                            
RTM_IFINFO: iface status change: len 152, if# 2, carrier: active, flags: <BROADCAST,RUNNING,PPROMISC,ALLMULTI,SIMPLEX,MULTICAST>

"PPROMISC" should be "PROMISC".
>Fix:
cvs diff: Diffing .
Index: route.c
===================================================================
RCS file: /cvsroot/src/sbin/route/route.c,v
retrieving revision 1.136.2.1
diff -u -r1.136.2.1 route.c
--- route.c     17 Oct 2012 21:57:07 -0000      1.136.2.1
+++ route.c     13 Dec 2017 09:05:36 -0000
@@ -1717,7 +1717,7 @@
 const char routeflags[] =
 "\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE\010MASK_PRESENT\011CLONING\012XRESOLVE\013LLINFO\014STATIC\015BLACKHOLE\016CLONED\017PROTO2\020PROTO1";
 const char ifnetflags[] =
-"\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5PTP\6NOTRAILERS\7RUNNING\010NOARP\011PPROMISC\012ALLMULTI\013OACTIVE\014SIMPLEX\015LINK0\016LINK1\017LINK2\020MULTICAST";
+"\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5PTP\6NOTRAILERS\7RUNNING\010NOARP\011PROMISC\012ALLMULTI\013OACTIVE\014SIMPLEX\015LINK0\016LINK1\017LINK2\020MULTICAST";
 const char addrnames[] =
 "\1DST\2GATEWAY\3NETMASK\4GENMASK\5IFP\6IFA\7AUTHOR\010BRD\011TAG";



Home | Main Index | Thread Index | Old Index