diff options
author | ae <ae@FreeBSD.org> | 2012-11-02 01:20:55 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2012-11-02 01:20:55 +0000 |
commit | 4354018055d167b2dd190c0ed81b74972a32fe2c (patch) | |
tree | 3080b551004723e63a6f3fe08ee72e510038fe57 /sys/netinet6/udp6_usrreq.c | |
parent | 99cf02c7fdbbd005e93ef256cbf128c446cd2ee8 (diff) | |
download | FreeBSD-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/netinet6/udp6_usrreq.c')
-rw-r--r-- | sys/netinet6/udp6_usrreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index d7040c4..952905a 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -92,7 +92,6 @@ __FBSDID("$FreeBSD$"); #include <net/if.h> #include <net/if_types.h> -#include <net/pfil.h> #include <net/route.h> #include <netinet/in.h> @@ -396,7 +395,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto) /* * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain. */ - if (V_pfilforward != 0 && + if ((m->m_flags & M_IP6_NEXTHOP) && (fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL)) != NULL) { struct sockaddr_in6 *next_hop6; @@ -423,6 +422,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto) } /* Remove the tag from the packet. We don't need it anymore. */ m_tag_delete(m, fwd_tag); + m->m_flags &= ~M_IP6_NEXTHOP; } else inp = in6_pcblookup_mbuf(&V_udbinfo, &ip6->ip6_src, uh->uh_sport, &ip6->ip6_dst, uh->uh_dport, |