diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-12-29 23:55:23 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-12-29 23:55:23 +0000 |
commit | 63391c8a5db16675a09e2b85adb79f92a443bdd2 (patch) | |
tree | 9c18302cfa15bef8328b9e49142efaa12471f444 /sys/kern | |
parent | 732ec12e1176c775f5378c4f03fdc88e8473bf3e (diff) |
Make sure that pf_mbuf_link_state_key() does not overwrite an
existing statekey in the mbuf header. Reset the statekey in
m_dup_pkthdr().
suggested by and OK sahan@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index bd89446fa98..24c9b5e21a6 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.251 2017/12/29 17:05:25 bluhm Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.252 2017/12/29 23:55:22 bluhm Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -1325,6 +1325,7 @@ m_dup_pkthdr(struct mbuf *to, struct mbuf *from, int wait) to->m_pkthdr = from->m_pkthdr; #if NPF > 0 + to->m_pkthdr.pf.statekey = NULL; pf_mbuf_link_state_key(to, from->m_pkthdr.pf.statekey); #endif /* NPF > 0 */ |