Go version
all versions since go1.18
Output of go env
in your module/workspace:
see above
What did you do?
Call net.Dialer.DialContext
to create a connected *net.UDPConn
. Call WriteMsgUDPAddrPort
on it with a zero value destination address.
What did you see happen?
WriteMsgUDPAddrPort
fails with non-IPv6 address
.
What did you expect to see?
WriteMsgUDPAddrPort
should allow zero value addresses, just like how WriteMsgUDP
allows nil addresses.
WriteMsgUDPAddrPort
is used here instead of Write
, because we need to send socket control messages together with the payload for UDP GSO.
This should be a straightforward fix. I'm sending a CL.
Comment From: mrkfrmn
CC @neild from owners.
Comment From: gopherbot
Change https://go.dev/cl/692436 mentions this issue: internal/poll: permit nil destination address in WriteMsg{Inet4,Inet6}
Comment From: gopherbot
Change https://go.dev/cl/692435 mentions this issue: syscall: permit nil destination address in sendmsgN{Inet4,Inet6}
Comment From: gopherbot
Change https://go.dev/cl/692437 mentions this issue: net: allow zero value destination address in WriteMsgUDPAddrPort