summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2010-07-14 20:56:35 +0000
committerclaudio <claudio@openbsd.org>2010-07-14 20:56:35 +0000
commit79b08af154120286c5ea053e2dbf61b745deede3 (patch)
tree671a9fda38850074ac7a9edfd6d10b45cce987a8
parentIn urndis_decap(), delay the memcpy() for as long as possible. There is (diff)
downloadwireguard-openbsd-79b08af154120286c5ea053e2dbf61b745deede3.tar.xz
wireguard-openbsd-79b08af154120286c5ea053e2dbf61b745deede3.zip
The append side of a socketbuffer is not allowed to call sbflush().
Learned the hard way. dlg@ confirmed that it is save to just remove them, the desync will still work but the reader needs to dequeue all packets first.
-rw-r--r--sys/net/rtsock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 6308d190b99..3a9bcae337b 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.104 2010/07/14 00:42:57 dlg Exp $ */
+/* $OpenBSD: rtsock.c,v 1.105 2010/07/14 20:56:35 claudio Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -367,7 +367,6 @@ route_input(struct mbuf *m0, ...)
sotoroutecb(last)->flags |=
ROUTECB_FLAG_DESYNC |
ROUTECB_FLAG_FLUSH;
- sbflush(&last->so_rcv);
rt_senddesync((void *) sotorawcb(last));
m_freem(n);
} else {
@@ -384,7 +383,6 @@ route_input(struct mbuf *m0, ...)
/* Flag socket as desync'ed and flush required */
sotoroutecb(last)->flags |=
ROUTECB_FLAG_DESYNC | ROUTECB_FLAG_FLUSH;
- sbflush(&last->so_rcv);
rt_senddesync((void *) sotorawcb(last));
m_freem(m);
} else {