diff options
| author | Luigi Rizzo <luigi@FreeBSD.org> | 2002-08-03 14:59:45 +0000 |
|---|---|---|
| committer | Luigi Rizzo <luigi@FreeBSD.org> | 2002-08-03 14:59:45 +0000 |
| commit | ea779ff36c8c8db4029d3ca9c12da0e2d46feae4 (patch) | |
| tree | 9623679e463d1f4b9170f11d4b91be38d2f873a8 | |
| parent | e9fb70115fcb6811107e65763e62cac4f4304fcd (diff) | |
Notes
| -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 cd38a1e74f916..7dae1d0180cde 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 { |
