summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2004-01-27 09:31:16 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2004-01-27 09:31:16 +0000
commitda89476e7cf2354a852ec6ee0b2e775c47b97ac6 (patch)
tree730477576c508ecf1ae1a434322ad422533ef257 /sys
parent0f8e79ca2928e831d9efe02766a0584846a3cc49 (diff)
drop packet if kif == NULL; ok henning deraadt
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 9024da00980..6e72226afc1 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.418 2004/01/06 20:24:33 dhartmei Exp $ */
+/* $OpenBSD: pf.c,v 1.419 2004/01/27 09:31:15 markus Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -5265,6 +5265,9 @@ pf_test(int dir, struct ifnet *ifp, struct mbuf **m0)
(m_tag_find(m, PACKET_TAG_PF_GENERATED, NULL) != NULL))
return (PF_PASS);
+ if (kif == NULL)
+ return (PF_DROP);
+
#ifdef DIAGNOSTIC
if ((m->m_flags & M_PKTHDR) == 0)
panic("non-M_PKTHDR is passed to pf_test");
@@ -5566,6 +5569,9 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0)
(m_tag_find(m, PACKET_TAG_PF_GENERATED, NULL) != NULL))
return (PF_PASS);
+ if (kif == NULL)
+ return (PF_DROP);
+
#ifdef DIAGNOSTIC
if ((m->m_flags & M_PKTHDR) == 0)
panic("non-M_PKTHDR is passed to pf_test");