summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2003-02-19 19:15:14 +0000
committerJason Wright <jason@cvs.openbsd.org>2003-02-19 19:15:14 +0000
commita36c6b51f17e5e5ee13fcff505d3095cedcf4ff1 (patch)
tree2d71e25c8178303cb28886fd7ee8d157e2d61cbd /sys
parent43f5fce9f385d36b1224556533ad26d42e65bcf5 (diff)
add a counter for times ipcomp is skipped because the packet is below the
minimum compression threshold.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ipsec_output.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c
index 719e707a839..903fb87cd4b 100644
--- a/sys/netinet/ipsec_output.c
+++ b/sys/netinet/ipsec_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_output.c,v 1.25 2002/08/28 15:43:03 pefo Exp $ */
+/* $OpenBSD: ipsec_output.c,v 1.26 2003/02/19 19:15:13 jason Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -306,7 +306,10 @@ ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready)
/* Non expansion policy for IPCOMP */
if (tdb->tdb_sproto == IPPROTO_IPCOMP) {
if ((m->m_pkthdr.len - i) < tdb->tdb_compalgxform->minlen) {
+ extern struct ipcompstat ipcompstat;
+
/* No need to compress, leave the packet untouched */
+ ipcompstat.ipcomps_minlen++;
return ipsp_process_done(m, tdb);
}
}