NetBSD Problem Report #52815

From www@NetBSD.org  Wed Dec 13 09:14:06 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 87AB37A1CC
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 13 Dec 2017 09:14:06 +0000 (UTC)
Message-Id: <20171213091356.6AD927A1FF@mollari.NetBSD.org>
Date: Wed, 13 Dec 2017 09:13:56 +0000 (UTC)
From: tsahara@iij.ad.jp
Reply-To: tsahara@iij.ad.jp
To: gnats-bugs@NetBSD.org
Subject: "route monitor" prints incorrect interface flag name
X-Send-Pr-Version: www-1.0

>Number:         52815
>Category:       bin
>Synopsis:       "route monitor" prints incorrect interface flag name
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 13 09:15:00 +0000 2017
>Closed-Date:    Sat Jan 04 03:07:02 +0000 2020
>Last-Modified:  Sat Jan 04 03:07:02 +0000 2020
>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:/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";

>Release-Note:

>Audit-Trail:
From: "Valeriy E. Ushakov" <uwe@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52815 CVS commit: src/sbin/route
Date: Wed, 13 Dec 2017 11:31:42 +0000

 Module Name:	src
 Committed By:	uwe
 Date:		Wed Dec 13 11:31:42 UTC 2017

 Modified Files:
 	src/sbin/route: route.c

 Log Message:
 Fix typo in flag name.  We should probably just use IFFBITS string
 that <net/if.h> defines.

 PR bin/52815


 To generate a diff of this commit:
 cvs rdiff -u -r1.156 -r1.157 src/sbin/route/route.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52815 CVS commit: [netbsd-8] src/sbin/route
Date: Thu, 21 Dec 2017 21:33:32 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Thu Dec 21 21:33:31 UTC 2017

 Modified Files:
 	src/sbin/route [netbsd-8]: route.c

 Log Message:
 Pull up following revision(s) (requested by uwe in ticket #448):
 	sbin/route/route.c: revision 1.157
 Fix typo in flag name.  We should probably just use IFFBITS string
 that <net/if.h> defines.
 PR bin/52815


 To generate a diff of this commit:
 cvs rdiff -u -r1.155.4.1 -r1.155.4.2 src/sbin/route/route.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52815 CVS commit: [netbsd-7] src/sbin/route
Date: Wed, 3 Jan 2018 21:21:16 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Wed Jan  3 21:21:16 UTC 2018

 Modified Files:
 	src/sbin/route [netbsd-7]: route.c

 Log Message:
 Pull up following revision(s) (requested by uwe in ticket #1542):
 	sbin/route/route.c: revision 1.157
 Fix typo in flag name.  We should probably just use IFFBITS string
 that <net/if.h> defines.
 PR bin/52815


 To generate a diff of this commit:
 cvs rdiff -u -r1.144.4.2 -r1.144.4.3 src/sbin/route/route.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Sat, 04 Jan 2020 03:07:02 +0000
State-Changed-Why:
Fixed on all supported branches.  Thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.