summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2005-06-06 02:41:29 +0000
committerthompsa <thompsa@FreeBSD.org>2005-06-06 02:41:29 +0000
commitf1995c4e852275d2e9955862a9afee98b375e441 (patch)
treeaad47ef9350a45815a53e3b611aa84a6773e2b53 /sys/net
parente3651a7bbf81c9250fac603b4cbe228fd45c2257 (diff)
downloadFreeBSD-src-f1995c4e852275d2e9955862a9afee98b375e441.zip
FreeBSD-src-f1995c4e852275d2e9955862a9afee98b375e441.tar.gz
Change ipv6 packet filtering to match ipv4. It now checks pfil_member and
pfil_bridge to determine which interfaces to filter on. Approved by: mlaier (mentor)
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_bridge.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 04fa6aa..d6825f3 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -2218,9 +2218,18 @@ static int bridge_pfil(struct mbuf **mp, struct ifnet *bifp,
# ifdef INET6
case ETHERTYPE_IPV6 :
error = (dir == PFIL_IN) ? bridge_ip6_checkbasic(mp) : 0;
- if (error == 0)
+
+ if (error == 0 && pfil_bridge && dir == PFIL_OUT)
+ error = pfil_run_hooks(&inet6_pfil_hook, mp, bifp,
+ dir, NULL);
+
+ if (error == 0 && pfil_member)
error = pfil_run_hooks(&inet6_pfil_hook, mp, ifp,
dir, NULL);
+
+ if (error == 0 && pfil_bridge && dir == PFIL_IN)
+ error = pfil_run_hooks(&inet6_pfil_hook, mp, bifp,
+ dir, NULL);
break;
# endif
default :
OpenPOWER on IntegriCloud