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/ip6_output.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/ip6_output.c')
-rw-r--r-- | sys/netinet6/ip6_output.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index e7254a6..0d762e9 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -913,8 +913,6 @@ again: goto again; /* Redo the routing table lookup. */ } - if (V_pfilforward == 0) - goto passout; /* See if local, if yes, send it to netisr. */ if (m->m_flags & M_FASTFWD_OURS) { if (m->m_pkthdr.rcvif == NULL) @@ -932,11 +930,12 @@ again: goto done; } /* Or forward to some other address? */ - fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); - if (fwd_tag) { + if ((m->m_flags & M_IP6_NEXTHOP) && + (fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL)) != NULL) { dst = (struct sockaddr_in6 *)&ro->ro_dst; bcopy((fwd_tag+1), dst, sizeof(struct sockaddr_in6)); m->m_flags |= M_SKIP_FIREWALL; + m->m_flags &= ~M_IP6_NEXTHOP; m_tag_delete(m, fwd_tag); goto again; } |