Source-Changes-HG archive

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

[src/netbsd-2-0]: src/usr.bin/netstat Pull up revision 1.4 (requested by jona...



details:   https://anonhg.NetBSD.org/src/rev/d214b89661e2
branches:  netbsd-2-0
changeset: 561952:d214b89661e2
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Jul 14 09:31:10 2004 +0000

description:
Pull up revision 1.4 (requested by jonathan in ticket #647):
Temporary hack to fix ipsec stats lossage. Atatat, are you listening?

diffstat:

 usr.bin/netstat/fast_ipsec.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 19bc4141311d -r d214b89661e2 usr.bin/netstat/fast_ipsec.c
--- a/usr.bin/netstat/fast_ipsec.c      Wed Jul 14 09:19:11 2004 +0000
+++ b/usr.bin/netstat/fast_ipsec.c      Wed Jul 14 09:31:10 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fast_ipsec.c,v 1.3.2.4 2004/05/11 14:57:42 tron Exp $ */
+/*     $NetBSD: fast_ipsec.c,v 1.3.2.5 2004/07/14 09:31:10 tron Exp $ */
 /*     $FreeBSD: src/tools/tools/crypto/ipsecstats.c,v 1.1.4.1 2003/06/03 00:13:13 sam Exp $ */
 
 /*-
@@ -33,7 +33,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 #ifdef __NetBSD__
-__RCSID("$NetBSD: fast_ipsec.c,v 1.3.2.4 2004/05/11 14:57:42 tron Exp $");
+__RCSID("$NetBSD: fast_ipsec.c,v 1.3.2.5 2004/07/14 09:31:10 tron Exp $");
 #endif
 #endif /* not lint*/
 
@@ -75,10 +75,10 @@
        
        slen = 0;
        status = sysctlbyname("net.inet.ipsec.stats", NULL, &slen, NULL, 0);
-       if (status == 0)
-           return fast_ipsec_stats(off, name);
+       if (status == 0 && slen == sizeof(struct newipsecstat))
+               return fast_ipsec_stats(off, name);
 
-       return ipsec_stats(off, name);
+       return ipsec_stats(off, "ipsec");
 }
 
 



Home | Main Index | Thread Index | Old Index