]> Cypherpunks repositories - gostls13.git/commit
internal/poll: don't pass non-nil WSAMsg.Name with 0 namelen on windows
authordatabase64128 <free122448@hotmail.com>
Fri, 22 Aug 2025 06:53:45 +0000 (14:53 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 22 Aug 2025 21:46:56 +0000 (14:46 -0700)
commit78a05c541f7c5f7b89abac11cff0ff18b029cb47
treea99f65b9c63c03ac12053527b43f4e5045c3ab08
parent52c3f73fda5b63c6da338e8447c51bbe00c237dd
internal/poll: don't pass non-nil WSAMsg.Name with 0 namelen on windows

CL 692436 changed WriteMsgInet{4,6} on windows to pass a zero namelen
when the sockaddr is nil. Turns out Windows also requires name to be
nil when namelen is 0.

With this commit, WriteMsgInet4 and WriteMsgInet6 now nicely align with
WriteMsg.

For #74841

Change-Id: Ifadee2d12d9bce2411f11a0e12b9fa2b3d71990e
Reviewed-on: https://go-review.googlesource.com/c/go/+/698395
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Auto-Submit: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Damien Neil <dneil@google.com>
src/internal/poll/fd_windows.go