NetBSD-Bugs archive

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

kern/43250: FAST_IPSEC ipcomp failes to update inbytes statistics



>Number:         43250
>Category:       kern
>Synopsis:       FAST_IPSEC ipcomp failes to update inbytes statistics
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 04 13:40:00 +0000 2010
>Originator:     W. Stukenbrock
>Release:        NetBSD 5.0.2
>Organization:
Dr. Nagler & Company GmbH
        
>Environment:
        
        
System: NetBSD s012 4.0 NetBSD 4.0 (NSW-S012) #11: Fri Mar 26 15:01:49 CET 2010 
root@s012:/usr/src/sys/arch/amd64/compile/NSW-S012 amd64
Architecture: x86_64
Machine: amd64
>Description:
        In /usr/src/sys/netipsec/xform_ipcomp.c the statistics for 
IPCOMP_STAT_IBYTES is not maintained.
        The counter does not increment when packets has been processed.
>How-To-Repeat:
        Setup a system with e.g. an ESP-IPCOMP tunnel and have a look at the 
statistic counters.
        The input counter does not increment.
>Fix:
        The following patch to /usr/src/sys/netipsec/xform_ipcomp.c will solve 
the problem:


--- xform_ipcomp.c      2010/05/04 13:25:55     1.1
+++ xform_ipcomp.c      2010/05/04 13:28:07
@@ -299,6 +299,9 @@
        }
        IPCOMP_STATINC(IPCOMP_STAT_HIST + sav->alg_comp);
  
+        /* Update the counters */
+       IPCOMP_STATADD(IPCOMP_STAT_IBYTES, m->m_pkthdr.len - skip);
+
        clen = crp->crp_olen;           /* Length of data after processing */
 
        /* Release the crypto descriptors */

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index