aboutsummaryrefslogtreecommitdiff
path: root/sys/netipsec
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2012-10-23 08:33:13 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2012-10-23 08:33:13 +0000
commit8ad458a471cae500bf9a8c2001576eae3e12c21b (patch)
tree3f8a671ee4ada31ed0990132b9e47b3cd8a49bc2 /sys/netipsec
parentd2bffb140e386cb132ec0a9a19e611ee0e91947e (diff)
downloadsrc-8ad458a471cae500bf9a8c2001576eae3e12c21b.tar.gz
src-8ad458a471cae500bf9a8c2001576eae3e12c21b.zip
Do not reduce ip_len by size of IP header in the ip_input()
before passing a packet to protocol input routines. For several protocols this mean that now protocol needs to do subtraction itself, and for another half this means that we do not need to add header length back to the packet. Make ip_stripoptions() to adjust ip_len, since now we enter this function with a packet header whose ip_len does represent length of entire packet, not payload only.
Notes
Notes: svn path=/head/; revision=241923
Diffstat (limited to 'sys/netipsec')
-rw-r--r--sys/netipsec/xform_ah.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/netipsec/xform_ah.c b/sys/netipsec/xform_ah.c
index 91fcad6a5713..722879b7442b 100644
--- a/sys/netipsec/xform_ah.c
+++ b/sys/netipsec/xform_ah.c
@@ -305,9 +305,6 @@ ah_massage_headers(struct mbuf **m0, int proto, int skip, int alg, int out)
ip->ip_ttl = 0;
ip->ip_sum = 0;
- if (!out)
- ip->ip_len = htons(ntohs(ip->ip_len) + skip);
-
if (alg == CRYPTO_MD5_KPDK || alg == CRYPTO_SHA1_KPDK)
ip->ip_off &= htons(IP_DF);
else