svn commit: r201502 - stable/6/sys/netipsec
Bjoern A. Zeeb
bz at FreeBSD.org
Mon Jan 4 14:56:17 UTC 2010
Author: bz
Date: Mon Jan 4 14:56:16 2010
New Revision: 201502
URL: http://svn.freebsd.org/changeset/base/201502
Log:
MFC r199896:
Directly send data uncompressed if the packet payload size is lower than
the compression algorithm threshold.
Modified:
stable/6/sys/netipsec/xform_ipcomp.c
Directory Properties:
stable/6/sys/ (props changed)
stable/6/sys/contrib/pf/ (props changed)
stable/6/sys/dev/cxgb/ (props changed)
Modified: stable/6/sys/netipsec/xform_ipcomp.c
==============================================================================
--- stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 14:52:45 2010 (r201501)
+++ stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 14:56:16 2010 (r201502)
@@ -350,6 +350,17 @@ ipcomp_output(
ipcompx = sav->tdb_compalgxform;
IPSEC_ASSERT(ipcompx != NULL, ("null compression xform"));
+ /*
+ * Do not touch the packet in case our payload to compress
+ * is lower than the minimal threshold of the compression
+ * alogrithm. We will just send out the data uncompressed.
+ * See RFC 3173, 2.2. Non-Expansion Policy.
+ */
+ if (m->m_pkthdr.len <= ipcompx->minlen) {
+ /* XXX-BZ V_ipcompstat.threshold++; */
+ return ipsec_process_done(m, isr);
+ }
+
ralen = m->m_pkthdr.len - skip; /* Raw payload length before comp. */
hlen = IPCOMP_HLENGTH;
More information about the svn-src-stable
mailing list