summaryrefslogtreecommitdiff
path: root/sys/netinet6/ip6_input.c
diff options
context:
space:
mode:
authorMike Frantzen <frantzen@cvs.openbsd.org>2001-09-15 03:54:41 +0000
committerMike Frantzen <frantzen@cvs.openbsd.org>2001-09-15 03:54:41 +0000
commitadeb7017dd09e40a6a27a4a9c5242c35377a7009 (patch)
tree4363966006567e7a4d76a052d57a7c3c54d56678 /sys/netinet6/ip6_input.c
parent30f56e676fcfe49de9e3435f2ddfdf2723c5c03d (diff)
IPv6 support from Ryan McBride (mcbride@countersiege.com)
Diffstat (limited to 'sys/netinet6/ip6_input.c')
-rw-r--r--sys/netinet6/ip6_input.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 1ae9ff7183d..d2dd44d14f8 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.32 2001/06/27 05:50:07 kjc Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.33 2001/09/15 03:54:40 frantzen Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -65,6 +65,8 @@
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
*/
+#include "pf.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@@ -108,6 +110,10 @@
#include "gif.h"
#include "bpfilter.h"
+#if NPF > 0
+#include <net/pfvar.h>
+#endif
+
extern struct domain inet6domain;
extern struct ip6protosw inet6sw[];
@@ -255,6 +261,14 @@ ip6_input(m)
IP6_EXTHDR_CHECK(m, 0, sizeof(struct ip6_hdr), /*nothing*/);
#endif
+#if NPF > 0
+ /*
+ * Packet filter
+ */
+ if (pf_test6(PF_IN, m->m_pkthdr.rcvif, &m) != PF_PASS)
+ goto bad;
+#endif
+
if (m->m_len < sizeof(struct ip6_hdr)) {
struct ifnet *inifp;
inifp = m->m_pkthdr.rcvif;