diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-01-12 09:07:47 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-01-12 09:07:47 +0000 |
commit | be096cda5961961fc25ad04f7ecb626737e95b3a (patch) | |
tree | 54d5bade58f20ece8fb92fb75d0c2bc8a7495444 | |
parent | 8bcea3d9ce9d22aa66ffed1adefe941b236645b4 (diff) |
Unlink PF state keys before passing mbufs to drivers.
Network drivers shouldn't have to deal with PF data structures. This change
prevent m_free(9) called from an interrupt handler at IPL_NET to mess with
pf(4) internals.
Prevent an splassert reported by Mark Patruck.
ok mikeb@, bluhm@
-rw-r--r-- | sys/net/if.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 7b0614b6f4f..20e9dcbc9de 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.473 2017/01/04 03:56:15 dlg Exp $ */ +/* $OpenBSD: if.c,v 1.474 2017/01/12 09:07:46 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -598,6 +598,10 @@ if_enqueue(struct ifnet *ifp, struct mbuf *m) length = m->m_pkthdr.len; mflags = m->m_flags; +#if NPF > 0 + pf_pkt_unlink_state_key(m); +#endif /* NPF > 0 */ + /* * Queue message on interface, and start output if interface * not yet active. |