You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does 'go version' print?
go version devel +ee11f19bc514 Mon Jun 23 18:46:01 2014 +0900 openbsd/amd64
What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.
package main
import (
"fmt"
"net"
)
func main() {
s, err := net.LookupHost("")
fmt.Printf("%v %v\n", s, err)
ip, err := net.LookupIP("")
fmt.Printf("%v %v\n", ip, err)
mx, err := net.LookupMX("")
fmt.Printf("%v %v\n", mx, err)
}
What happened?
[2001:470:c049::162 24.247.20.162] <nil>
[2001:470:c049::162 24.247.20.162] <nil>
[] lookup : invalid domain name
What should have happened instead?
All Lookup's should have failed with invalid hostname/domainname
Please provide any additional information below.
OpenBSD fog.mindcry.org 5.5 GENERIC.MP#0 amd64
The text was updated successfully, but these errors were encountered:
I highly doubt that this is a Go specific issue - the net package is only calling
C.getaddrinfo via cgo. My guess is that a pure C program will behave in the same manner
(most likely related to the new OpenBSD ASR, combined with your resolv.conf
configuration).
Is that your local IP address, 24.247.20.162?
I think that's semi-standard for putting no host in.
It's the same reason that listening to ":12345" really means "listen to local IP address
on that port".
It's a bit odd but I think it's correct.
This was a bug/change in behaviour in the new OpenBSD ASR that has since been fixed (in
OpenBSD). From a Go perspective things were working as intended.
by david@mindcry.org:
The text was updated successfully, but these errors were encountered: