aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip_fastfwd.c
diff options
context:
space:
mode:
authorAndre Oppermann <andre@FreeBSD.org>2004-09-13 17:01:53 +0000
committerAndre Oppermann <andre@FreeBSD.org>2004-09-13 17:01:53 +0000
commiteedc0a753507aa1d1c5e9b59eb65c4154b044848 (patch)
tree4b3cdbbc58cec9a2984cd21018390fd6abf7bb2d /sys/netinet/ip_fastfwd.c
parente8929330e72da905c11225a0babec0777af03b97 (diff)
downloadsrc-eedc0a753507aa1d1c5e9b59eb65c4154b044848.tar.gz
src-eedc0a753507aa1d1c5e9b59eb65c4154b044848.zip
Fix ip_input() fallback for the destination modified cases (from the packet
filters). After the ipfw to pfil move ip_input() expects M_FASTFWD_OURS tagged packets to have ip_len and ip_off in host byte order instead of network byte order. PR: kern/71652 Submitted by: mlaier (patch)
Notes
Notes: svn path=/head/; revision=135158
Diffstat (limited to 'sys/netinet/ip_fastfwd.c')
-rw-r--r--sys/netinet/ip_fastfwd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c
index 6dbe1f6836c6..8d78c0e3fb95 100644
--- a/sys/netinet/ip_fastfwd.c
+++ b/sys/netinet/ip_fastfwd.c
@@ -465,14 +465,12 @@ passin:
if (in_localip(dest) || m->m_flags & M_FASTFWD_OURS) {
#endif /* IPFIREWALL_FORWARD */
forwardlocal:
- /* for ip_input */
- m->m_flags |= M_FASTFWD_OURS;
- ip->ip_len = htons(ip->ip_len);
- ip->ip_off = htons(ip->ip_off);
-
/*
- * Return packet for processing by ip_input()
+ * Return packet for processing by ip_input().
+ * Keep host byte order as expected at ip_input's
+ * "ours"-label.
*/
+ m->m_flags |= M_FASTFWD_OURS;
if (ro.ro_rt)
RTFREE(ro.ro_rt);
return 0;