summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index ecf79ae..6eaf3eb 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -468,7 +468,19 @@ tooshort:
m->m_flags &= ~M_FASTFWD_OURS;
goto ours;
}
+#ifndef IPFIREWALL_FORWARD_EXTENDED
dchg = (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL);
+#else
+ if ((dchg = (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL)) != 0) {
+ /*
+ * Directly ship on the packet. This allows to forward packets
+ * that were destined for us to some other directly connected
+ * host.
+ */
+ ip_forward(m, dchg);
+ return;
+ }
+#endif /* IPFIREWALL_FORWARD_EXTENDED */
#endif /* IPFIREWALL_FORWARD */
passin:
OpenPOWER on IntegriCloud