Source-Changes-HG archive

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

[src/trunk]: src/sys/netipsec Fix ipcomp input counter



details:   https://anonhg.NetBSD.org/src/rev/9b5f27005944
branches:  trunk
changeset: 757767:9b5f27005944
user:      degroote <degroote%NetBSD.org@localhost>
date:      Tue Sep 21 13:41:18 2010 +0000

description:
Fix ipcomp input counter

Reported Wolfgang Stukenbrock in pr/43250.

diffstat:

 sys/netipsec/xform_ipcomp.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 1fdec43baa07 -r 9b5f27005944 sys/netipsec/xform_ipcomp.c
--- a/sys/netipsec/xform_ipcomp.c       Tue Sep 21 13:14:17 2010 +0000
+++ b/sys/netipsec/xform_ipcomp.c       Tue Sep 21 13:41:18 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ipcomp.c,v 1.19 2009/03/18 16:00:23 cegger Exp $ */
+/*     $NetBSD: xform_ipcomp.c,v 1.20 2010/09/21 13:41:18 degroote Exp $       */
 /*     $FreeBSD: src/sys/netipsec/xform_ipcomp.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $       */
 /* $OpenBSD: ip_ipcomp.c,v 1.1 2001/07/05 12:08:52 jjbg Exp $ */
 
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ipcomp.c,v 1.19 2009/03/18 16:00:23 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipcomp.c,v 1.20 2010/09/21 13:41:18 degroote Exp $");
 
 /* IP payload compression protocol (IPComp), see RFC 2393 */
 #include "opt_inet.h"
@@ -299,6 +299,10 @@
        }
        IPCOMP_STATINC(IPCOMP_STAT_HIST + sav->alg_comp);
 
+       /* Update the counters */
+       IPCOMP_STATADD(IPCOMP_STAT_IBYTES, m->m_pkthdr.len - skip - hlen);
+
+
        clen = crp->crp_olen;           /* Length of data after processing */
 
        /* Release the crypto descriptors */



Home | Main Index | Thread Index | Old Index