Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data
@ 2021-04-24 13:33 Sascha Dierberg
  2021-04-27  2:09 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha Dierberg @ 2021-04-24 13:33 UTC (permalink / raw)
  To: wireguard

From: Sascha Dierberg <dierberg@dresearch-fe.de>

Signed-off-by: Sascha Dierberg <dierberg@dresearch-fe.de>
---
 conn/bind_windows.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/conn/bind_windows.go b/conn/bind_windows.go
index fdd1c24..e78bef9 100644
--- a/conn/bind_windows.go
+++ b/conn/bind_windows.go
@@ -389,6 +389,10 @@ func (bind *afWinRingBind) Receive(buf []byte,
isOpen *uint32) (int, Endpoint, e
  if err != nil {
  return 0, nil, err
  }
+ // WSAEMSGSIZE message too long error on Winsock2
+ if results[0].Status == 10040 {
+ return 0, nil, nil
+ }
  if results[0].Status != 0 {
  return 0, nil, windows.Errno(results[0].Status)
  }
-- 
2.31.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data
  2021-04-24 13:33 [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data Sascha Dierberg
@ 2021-04-27  2:09 ` Jason A. Donenfeld
  2021-05-11 13:29   ` Sascha Dierberg
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2021-04-27  2:09 UTC (permalink / raw)
  To: sascha; +Cc: WireGuard mailing list

Thanks for the patch. That's a nice bug you found.

I fixed things slightly differently, but mentioned you in the commit:
https://git.zx2c4.com/wireguard-go/commit/?id=8246d251ea9b9cbef07082bd69280a8f988cec0c

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data
  2021-04-27  2:09 ` Jason A. Donenfeld
@ 2021-05-11 13:29   ` Sascha Dierberg
  2021-05-11 14:49     ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha Dierberg @ 2021-05-11 13:29 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

Hello Jason,

your bugfix works fine for jumbo packets but not if the Windows socket
is flooded with  " nc -u <IP-Addr:port>  < /dev/urandom ".

best regards - Sascha

Am Di., 27. Apr. 2021 um 04:10 Uhr schrieb Jason A. Donenfeld <Jason@zx2c4.com>:
>
> Thanks for the patch. That's a nice bug you found.
>
> I fixed things slightly differently, but mentioned you in the commit:
> https://git.zx2c4.com/wireguard-go/commit/?id=8246d251ea9b9cbef07082bd69280a8f988cec0c



-- 
Sascha Dierberg
Karl-Marx-Allee 61
D-10243 Berlin
mailto:sascha@dierberg.de
Phone: +49 178 3727242
Fax: +49 30 42019631

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data
  2021-05-11 13:29   ` Sascha Dierberg
@ 2021-05-11 14:49     ` Jason A. Donenfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Jason A. Donenfeld @ 2021-05-11 14:49 UTC (permalink / raw)
  To: sascha; +Cc: WireGuard mailing list

Hi Sascha,

Oh, boy, that's embarrassing. Fixed here:
https://git.zx2c4.com/wireguard-go/commit/?id=5846b622837e04dbc35b153d9ceda7fd66397520

Thanks again for the report.

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-11 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-24 13:33 [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data Sascha Dierberg
2021-04-27  2:09 ` Jason A. Donenfeld
2021-05-11 13:29   ` Sascha Dierberg
2021-05-11 14:49     ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).