diff options
author | luigi <luigi@FreeBSD.org> | 2002-08-03 14:59:45 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-08-03 14:59:45 +0000 |
commit | 6f96abf099f562e4a52b2bea74f8b52fabaec68b (patch) | |
tree | 9623679e463d1f4b9170f11d4b91be38d2f873a8 | |
parent | eefed45007e6816b7f886d29f31a6079c800fbb7 (diff) | |
download | FreeBSD-src-6f96abf099f562e4a52b2bea74f8b52fabaec68b.zip FreeBSD-src-6f96abf099f562e4a52b2bea74f8b52fabaec68b.tar.gz |
Fix handling of packets which matched an "ipfw fwd" rule on the input side.
-rw-r--r-- | sys/netinet/ip_input.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index cd38a1e..7dae1d0 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1738,8 +1738,21 @@ ip_forward(struct mbuf *m, int srcrt, struct sockaddr_in *next_hop) } } + { + struct m_hdr tag; + + if (next_hop) { + /* Pass IPFORWARD info if available */ + + tag.mh_type = MT_TAG; + tag.mh_flags = PACKET_TAG_IPFORWARD; + tag.mh_data = (caddr_t)next_hop; + tag.mh_next = m; + m = (struct mbuf *)&tag; + } error = ip_output(m, (struct mbuf *)0, &ipforward_rt, IP_FORWARDING, 0); + } if (error) ipstat.ips_cantforward++; else { |