-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: WriteMsgUDPAddrPort should accept IPv4 destination addresses on IPv6 UDP sockets #52264
Comments
WriteMsgUDPAddrPort should accept IPv4 target addresses on IPv6 UDP sockets. An IPv4 target address will be converted to an IPv4-mapped IPv6 address. Fixes golang#52264.
Change https://go.dev/cl/399454 mentions this issue: |
@database64128 maybe !addr.IsValid() ? |
CC @ianlancetaylor, @neild. |
WriteMsgUDPAddrPort should accept IPv4 target addresses on IPv6 UDP sockets. An IPv4 target address will be converted to an IPv4-mapped IPv6 address. Fixes golang#52264.
Includes a workaround for golang/go#52264.
WriteMsgUDPAddrPort should accept IPv4 target addresses on IPv6 UDP sockets. An IPv4 target address will be converted to an IPv4-mapped IPv6 address. Fixes golang#52264.
WriteMsgUDPAddrPort should accept IPv4 target addresses on IPv6 UDP sockets. An IPv4 target address will be converted to an IPv4-mapped IPv6 address. Fixes golang#52264.
WriteMsgUDPAddrPort should accept IPv4 target addresses on IPv6 UDP sockets. An IPv4 target address will be converted to an IPv4-mapped IPv6 address. Fixes golang#52264.
@ianlancetaylor @neild, now that we're moving more stuff over to Candidate for Go 1.19 + backport to Go 1.18? |
@gopherbot, please backport to Go 1.18. |
Backport issue(s) opened: #54074 (for 1.18). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/420775 mentions this issue: |
…DragonflyBSD Like OpenBSD, DragonflyBSD does not do IPv4-in-IPv6 mapping. For #52264. Change-Id: Id41606e75652e684f2e0e98c6459156641aec9b5 Reviewed-on: https://go-review.googlesource.com/c/go/+/420775 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
Workaround for golang/go#52264 is no longer needed in 1.19.
WriteMsgUDPAddrPort should accept IPv4 target addresses on IPv6 UDP sockets. An IPv4 target address will be converted to an IPv4-mapped IPv6 address. Fixes golang#52264. Change-Id: Ib9ed4c61fa1289ae7bbc8c4c9de1a9951b647ec0 GitHub-Last-Rev: 6776fdb GitHub-Pull-Request: golang#52265 Reviewed-on: https://go-review.googlesource.com/c/go/+/399454 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Damien Neil <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
…DragonflyBSD Like OpenBSD, DragonflyBSD does not do IPv4-in-IPv6 mapping. For golang#52264. Change-Id: Id41606e75652e684f2e0e98c6459156641aec9b5 Reviewed-on: https://go-review.googlesource.com/c/go/+/420775 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
With respect to backports, what's the status of this bug/fix? |
Change https://go.dev/cl/425488 mentions this issue: |
The status of #54074 is that it's approved, but a cherry-pick CL hasn't been made yet. I made CL 425488 following https://go.dev/wiki/MinorReleases#making-cherry-pick-cls. |
WriteMsgUDPAddrPort should accept IPv4 target addresses on IPv6 UDP sockets. An IPv4 target address will be converted to an IPv4-mapped IPv6 address. Include the change in CL 420775 to also skip the test on DragonflyBSD. Updates #52264. Fixes #54074. Change-Id: Ib9ed4c61fa1289ae7bbc8c4c9de1a9951b647ec0 GitHub-Last-Rev: 6776fdb GitHub-Pull-Request: #52265 Reviewed-on: https://go-review.googlesource.com/c/go/+/399454 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Damien Neil <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-on: https://go-review.googlesource.com/c/go/+/425488 Reviewed-by: David Chase <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Create an IPv6 UDP socket listening on
::
. CallWriteMsgUDPAddrPort
with an IPv4 target address.What did you expect to see?
The write succeeds, just like
WriteMsgUDP
.What did you see instead?
go/src/net/ipsock_posix.go
Lines 215 to 228 in db7183c
The check performed here should allow IPv4 as well.
The text was updated successfully, but these errors were encountered: