diff options
author | andre <andre@FreeBSD.org> | 2004-09-13 17:01:53 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2004-09-13 17:01:53 +0000 |
commit | 532ad0416b48dabda3d0c776c304cce1ec42b856 (patch) | |
tree | 4b3cdbbc58cec9a2984cd21018390fd6abf7bb2d /sys/netinet/ip_fastfwd.c | |
parent | a18be84c1f22afbfea4ac9ecd09725a69b7b0d4f (diff) | |
download | FreeBSD-src-532ad0416b48dabda3d0c776c304cce1ec42b856.zip FreeBSD-src-532ad0416b48dabda3d0c776c304cce1ec42b856.tar.gz |
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)
Diffstat (limited to 'sys/netinet/ip_fastfwd.c')
-rw-r--r-- | sys/netinet/ip_fastfwd.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 6dbe1f6..8d78c0e 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; |