summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authoroga <oga@openbsd.org>2011-05-13 14:31:16 +0000
committeroga <oga@openbsd.org>2011-05-13 14:31:16 +0000
commitdda46e081c914a53cca99225de98dcc0d41f936f (patch)
tree9f9378fa5ad43027f94b90608eae22f35d13b6c1 /sys/netinet/tcp_output.c
parentreplace handrolled NELEM() with nitems() (diff)
downloadwireguard-openbsd-dda46e081c914a53cca99225de98dcc0d41f936f.tar.xz
wireguard-openbsd-dda46e081c914a53cca99225de98dcc0d41f936f.zip
Revert the pf->socket linking diff.
at least krw@, pirofti@ and todd@ have been seeing panics (todd and krw with xxxterm not sure about pirofti) involving pool corruption while using this commit. krw and todd confirm that this backout fixes the problem. ok blambert@ krw@, todd@ henning@ and kettenis@ Double link between pf states and sockets. Henning has already implemented half of it. The additional part is: - The pf state lookup for outgoing packets is optimized by using mbuf->inp->state. - For incomming tcp, udp, raw, raw6 packets the socket lookup always is optimized by using mbuf->state->inp. - All protocols establish the link for incomming packets. - All protocols set the inp in the mbuf for outgoing packets. This allows the linkage beginning with the first packet for outgoing connections. - In case of divert states, delete the state when the socket closes. Otherwise new connections could match on old states instead of being diverted to the listen socket. ok henning@
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index bb5416e7e0f..7e1776865b5 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.95 2011/04/24 19:36:54 bluhm Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.96 2011/05/13 14:31:17 oga Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -98,8 +98,6 @@
#include <netinet6/in6_var.h>
#endif /* INET6 */
-#include "pf.h"
-
#ifdef notyet
extern struct mbuf *m_copypack();
#endif
@@ -1079,10 +1077,6 @@ send:
/* force routing domain */
m->m_pkthdr.rdomain = tp->t_inpcb->inp_rtableid;
-#if NPF > 0
- m->m_pkthdr.pf.inp = tp->t_inpcb;
-#endif
-
switch (tp->pf) {
case 0: /*default to PF_INET*/
#ifdef INET