aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-11-05 13:02:09 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-11-10 22:16:25 +0000
commit4d0683965bd05aee6845bf6849c85c4bf2bb10d4 (patch)
tree47e4ff8261e37583eed0f042e1f599fafd36ec0b /src/sync
parent23f653df963ddf3ae618290edbb0c55530fcf483 (diff)
downloadgo-4d0683965bd05aee6845bf6849c85c4bf2bb10d4.tar.xz
net: do more faithful conversion from AddrPort to UDPAddr
A UDPAddr with a nil IP is a valid state, representing an AF-agnostic unspecified address, so checking for addr.IsValid() isn't correct; remove that, as it's only needed in the UDP rx path where it can be added. Secondly, forcing everything to be IPv6 also is not correct, and was likely done when the missing .AsSlice() made doing the right thing less ergonomic. Fix this by using .AsSlice(), which properly preserves IP version. Change-Id: Idd1eaecd4076f32a843f859a0a9802ef98f956d3 Reviewed-on: https://go-review.googlesource.com/c/go/+/361478 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/sync')
0 files changed, 0 insertions, 0 deletions