Skip to content

net: never probe IPv4 map support on DragonFly BSD, OpenBSD #45243

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/net/ipsock.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package net
import (
"context"
"internal/bytealg"
"runtime"
"sync"
)

Expand Down Expand Up @@ -44,6 +45,13 @@ func supportsIPv6() bool {
// IPv4 address inside an IPv6 address at transport layer
// protocols. See RFC 4291, RFC 4038 and RFC 3493.
func supportsIPv4map() bool {
// Some operating systems provide no support for mapping IPv4
// addresses to IPv6, and a runtime check is unnecessary.
switch runtime.GOOS {
case "dragonfly", "openbsd":
return false
}

ipStackCaps.Once.Do(ipStackCaps.probe)
return ipStackCaps.ipv4MappedIPv6Enabled
}
Expand Down