summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-02-02 16:33:12 +0000
committerbrian <brian@FreeBSD.org>1997-02-02 16:33:12 +0000
commiteada59b88e87dabb8beab546a26940053e20412c (patch)
tree3b22b36bda43c1116542d4ffb813de6522f42a08 /sys/netinet/ip_output.c
parentf96247a1302a72652b4c3f778b17e8f227d3e15f (diff)
downloadFreeBSD-src-eada59b88e87dabb8beab546a26940053e20412c.zip
FreeBSD-src-eada59b88e87dabb8beab546a26940053e20412c.tar.gz
Reset ip_divert_ignore to zero immediately after use - also,
set it in the first place, independent of whether sin->sin_port is set. The result is that diverted packets that are being forwarded will be diverted once and only once on the way in (ip_input()) and again, once and only once on the way out (ip_output()) - twice in total. ICMP packets that don't contain a port will now also be diverted.
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index e62bf6f..81358ba 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -355,6 +355,7 @@ sendit:
#ifdef IPDIVERT
action = (*ip_fw_chk_ptr)(&ip,
hlen, ifp, (~0 << 16) | ip_divert_ignore, &m);
+ ip_divert_ignore = 0;
#else
action = (*ip_fw_chk_ptr)(&ip, hlen, ifp, (~0 << 16), &m);
#endif
OpenPOWER on IntegriCloud