Subject: bin/11323: netstat(1) displays pfkey statistics twice and ddp statistics thrice
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ura@hiru.aoba.yokohama.jp>
List: netbsd-bugs
Date: 10/27/2000 11:10:18
>Number: 11323
>Category: bin
>Synopsis: netstat(1) displays pfkey statistics twice and ddp statistics thrice
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 27 11:10:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: URA Hiroshi
>Release: NetBSD-current (2000/10/25)
>Organization:
URA Hiroshi E-mail: ura@hiru.aoba.yokohama.jp
>Environment:
System: NetBSD uzuki.hiru.aoba.yokohama.jp 1.5H NetBSD 1.5H (UZUKI) #15: Wed Oct 25 12:53:45 JST 2000 ura@uzuki.hiru.aoba.yokohama.jp:/amd/yayoi/usr/local/src/NetBSD/current/src/sys/arch/sparc/compile/UZUKI sparc
>Description:
When I run netstat -s on kernel w/ IPSEC, netstat(1) displays pfkey
statistics twice.
% netstat -s | egrep '^[a-z]'
ip:
...
ipsec6:
pim6:
arp:
pfkey:
pfkey:
nestat(1) probably displays ddp statistics thrice on kernel w/ NETATALK.
>How-To-Repeat:
Try it on kernel w/ IPSEC and/or NETATALK.
>Fix:
apply this patch.
Index: main.c
===================================================================
RCS file: /cvsroot/netbsd/basesrc/usr.bin/netstat/main.c,v
retrieving revision 1.30
diff -u -u -r1.30 main.c
--- main.c 2000/10/05 03:22:59 1.30
+++ main.c 2000/10/27 17:38:48
@@ -243,16 +243,16 @@
struct protox arpprotox[] = {
{ -1, N_ARPSTAT, 1, 0,
arp_stats, NULL, 0, "arp" },
+ { -1, -1, 0, 0,
+ 0, NULL, 0, 0 }
};
#ifdef IPSEC
struct protox pfkeyprotox[] = {
{ -1, N_PFKEYSTAT, 1, 0,
pfkey_stats, NULL, 0, "pfkey" },
-#if 0
{ -1, -1, 0, 0,
0, NULL, 0, 0 }
-#endif
};
#endif
>Release-Note:
>Audit-Trail:
>Unformatted: