diff options
author | 2018-09-13 19:53:58 +0000 | |
---|---|---|
committer | 2018-09-13 19:53:58 +0000 | |
commit | 0e5609475351394c791e132db4e33c768b1a41fc (patch) | |
tree | 309f3348a388032d3de179953da0738de6c0306f /sys/netinet/tcp_output.c | |
parent | missing comma in previous; (diff) | |
download | wireguard-openbsd-0e5609475351394c791e132db4e33c768b1a41fc.tar.xz wireguard-openbsd-0e5609475351394c791e132db4e33c768b1a41fc.zip |
Add reference counting for inet pcb, this will be needed when we
start locking the socket. An inp can be referenced by the PCB queue
and hashes, by a pf mbuf header, or by a pf state key.
OK visa@
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r-- | sys/netinet/tcp_output.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 7abcf26675e..0584c0c2060 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.125 2018/06/11 07:40:26 bluhm Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.126 2018/09/13 19:53:58 bluhm Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -78,7 +78,11 @@ #include <sys/socketvar.h> #include <sys/kernel.h> +#include <net/if.h> #include <net/route.h> +#if NPF > 0 +#include <net/pfvar.h> +#endif #include <netinet/in.h> #include <netinet/ip.h> @@ -1014,7 +1018,7 @@ send: m->m_pkthdr.ph_rtableid = tp->t_inpcb->inp_rtableid; #if NPF > 0 - m->m_pkthdr.pf.inp = tp->t_inpcb; + pf_mbuf_link_inpcb(m, tp->t_inpcb); #endif switch (tp->pf) { |