diff options
author | 2013-01-17 11:43:06 +0000 | |
---|---|---|
committer | 2013-01-17 11:43:06 +0000 | |
commit | e034875e6640e67ecdff107c4b98bf4b929c0076 (patch) | |
tree | 866ba2540cbdd4da898df9de5b15ae744756bf25 /sys/netinet/tcp_input.c | |
parent | Instead of creating line termios from scratch, call tcgetattr() and (diff) | |
download | wireguard-openbsd-e034875e6640e67ecdff107c4b98bf4b929c0076.tar.xz wireguard-openbsd-e034875e6640e67ecdff107c4b98bf4b929c0076.zip |
After finding the socket's inp by using the pf's statekey, reset
the pointer to the statekey in the mbuf.
When an UDP socket is spliced, pf would use this key during ip_output()
although the packet went through two sockets in the meantime. Reset
the mbuf's statekey in tcp_input() and udp_input() to eliminate the
pointer to pf lingering in the socket buffers.
OK claudio@
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index c82d2e79e16..2548504386e 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.254 2013/01/17 00:48:04 henning Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.255 2013/01/17 11:43:06 bluhm Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -899,6 +899,8 @@ findpcb: ((struct pf_state_key *)m->m_pkthdr.pf.statekey)->inp = inp; inp->inp_pf_sk = m->m_pkthdr.pf.statekey; } + /* The statekey has finished finding the inp, it is no longer needed. */ + m->m_pkthdr.pf.statekey = NULL; #endif #ifdef IPSEC |