summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2015-10-26 13:03:40 -0500
committerLuiz Otavio O Souza <luiz@netgate.com>2015-10-26 13:03:40 -0500
commitc58873dc9abc56028cc3435f692fd3583bd143af (patch)
treee5a1221be9e1e0242210109cac6e190bc8964339 /sys/netinet/ip_input.c
parent4820bf8d15308af1f92485a16748492c0dab1c04 (diff)
downloadFreeBSD-src-c58873dc9abc56028cc3435f692fd3583bd143af.zip
FreeBSD-src-c58873dc9abc56028cc3435f692fd3583bd143af.tar.gz
Replace the fastforward path with tryforward which does not require a sysctl and will always be on.
The former split between default and fast forwarding is removed by this commit while preserving the ability to use all network stack features. TAG: tryforward Differential Revision: https://reviews.freebsd.org/D3737
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 287417c..5009346 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -714,6 +714,10 @@ ours:
hlen = ip->ip_hl << 2;
}
+ /* Try to forward the packet, but if we fail continue */
+ if (ip_tryforward(m) == NULL)
+ return;
+
#ifdef IPSEC
/*
* enforce IPsec policy checking if we are seeing last header.
OpenPOWER on IntegriCloud