summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2012-11-02 01:20:55 +0000
committerae <ae@FreeBSD.org>2012-11-02 01:20:55 +0000
commit4354018055d167b2dd190c0ed81b74972a32fe2c (patch)
tree3080b551004723e63a6f3fe08ee72e510038fe57 /sys/netinet/tcp_input.c
parent99cf02c7fdbbd005e93ef256cbf128c446cd2ee8 (diff)
downloadFreeBSD-src-4354018055d167b2dd190c0ed81b74972a32fe2c.zip
FreeBSD-src-4354018055d167b2dd190c0ed81b74972a32fe2c.tar.gz
Remove the recently added sysctl variable net.pfil.forward.
Instead, add protocol specific mbuf flags M_IP_NEXTHOP and M_IP6_NEXTHOP. Use them to indicate that the mbuf's chain contains the PACKET_TAG_IPFORWARD tag. And do a tag lookup only when this flag is set. Suggested by: andre
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index ba642a6..a89257e 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$");
#include <vm/uma.h>
#include <net/if.h>
-#include <net/pfil.h>
#include <net/route.h>
#include <net/vnet.h>
@@ -781,7 +780,7 @@ findpcb:
/*
* Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain.
*/
- if (V_pfilforward != 0)
+ if (m->m_flags & M_IP_NEXTHOP)
fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL);
#ifdef INET6
@@ -810,6 +809,7 @@ findpcb:
}
/* Remove the tag from the packet. We don't need it anymore. */
m_tag_delete(m, fwd_tag);
+ m->m_flags &= ~M_IP_NEXTHOP;
} else if (isipv6) {
inp = in6_pcblookup_mbuf(&V_tcbinfo, &ip6->ip6_src,
th->th_sport, &ip6->ip6_dst, th->th_dport,
@@ -846,6 +846,7 @@ findpcb:
}
/* Remove the tag from the packet. We don't need it anymore. */
m_tag_delete(m, fwd_tag);
+ m->m_flags &= ~M_IP_NEXTHOP;
} else
inp = in_pcblookup_mbuf(&V_tcbinfo, ip->ip_src,
th->th_sport, ip->ip_dst, th->th_dport,
OpenPOWER on IntegriCloud