diff options
author | glebius <glebius@FreeBSD.org> | 2012-10-23 08:33:13 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-10-23 08:33:13 +0000 |
commit | fea857f2a843cb039f3757ef79ba28b083d7a0c3 (patch) | |
tree | 3f8a671ee4ada31ed0990132b9e47b3cd8a49bc2 /sys/netinet/ip_input.c | |
parent | 6a485e417ac3a2996d760532faaf5a48a890d223 (diff) | |
download | FreeBSD-src-fea857f2a843cb039f3757ef79ba28b083d7a0c3.zip FreeBSD-src-fea857f2a843cb039f3757ef79ba28b083d7a0c3.tar.gz |
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.
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 1b27a7f..848325b 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -731,12 +731,6 @@ ours: ip_len = ntohs(ip->ip_len); } - /* - * Further protocols expect the packet length to be w/o the - * IP header. - */ - ip->ip_len = htons(ip_len - hlen); - #ifdef IPSEC /* * enforce IPsec policy checking if we are seeing last header. |