Skip to content
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: LookupIP should use getaddrinfo on Windows #2315

Closed
gopherbot opened this issue Sep 29, 2011 · 13 comments
Closed

net: LookupIP should use getaddrinfo on Windows #2315

gopherbot opened this issue Sep 29, 2011 · 13 comments
Milestone

Comments

@gopherbot
Copy link

by jp@webmaster.ms:

What steps will reproduce the problem?
------
package main

import "fmt"
import "net"

func main() {
  addr, e := net.LookupIP("www.ripe.net")
  fmt.Println(addr, e)
}
------
What is the expected output?
[2001:67c:2e8:22::c100:68b 193.0.6.139] <nil>

What do you see instead?
[193.0.6.139] <nil>

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g, 8g

Which operating system are you using?
Windows 7

Which revision are you using?  (hg identify)
r60

Please provide any additional information below.
gethostbyname() is deprecated since Windows 2000.
It has no glue about IPv6 addresses.
getaddrinfo() should be used instead as it is done in Linux version.
@bradfitz
Copy link
Contributor

Comment 1:

On Linux here,
[193.0.6.139 2001:67c:2e8:22::c100:68b] <nil>
So I think this is just a Windows issue.

Labels changed: added os-windows.

@alexbrainman
Copy link
Member

Comment 2:

I am fine with that, but, please, lets make it so I can still use existing functionality
on my w2k :-)

Labels changed: added packagebug.

Owner changed to @alexbrainman.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Oct 6, 2011

Comment 3:

Status changed to HelpWanted.

@rsc
Copy link
Contributor

rsc commented Oct 6, 2011

Comment 4:

// Called directly by OS as signal handler.
#pragma textflag 7
before the definition of runtime.sigignore in both freebsd/386/signal.c and
freebsd/amd64/signal.c.
This is a difference compared to the Darwin port because on Darwin the function gets
called via sigtramp.  On FreeBSD it is being given to the signal handler directly, so it
cannot be a typical Go stack-checking function.

@rsc
Copy link
Contributor

rsc commented Dec 9, 2011

Comment 5:

Labels changed: added priority-later.

@rsc
Copy link
Contributor

rsc commented Dec 12, 2011

Comment 6:

Labels changed: added priority-go1.

@robpike
Copy link
Contributor

robpike commented Jan 13, 2012

Comment 7:

Owner changed to builder@golang.org.

@alexbrainman
Copy link
Member

Comment 8:

I have done some work on that. It is low priority for me, but I plan to finish it. If
someone needs this urgently, I will change my plans. Alternatively, I could share my
efforts so far.
Alex

@rsc
Copy link
Contributor

rsc commented Jan 24, 2012

Comment 9:

Labels changed: added priority-later, removed priority-go1.

@gopherbot
Copy link
Author

Comment 10 by siyabonga.dlamini:

Also have the same issue.
Using Go1.02 on Win7

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 11:

Labels changed: added go1.1.

@alexbrainman
Copy link
Member

Comment 12:

http://golang.org/cl/6822045/

Status changed to Started.

@alexbrainman
Copy link
Member

Comment 13:

This issue was closed by revision eb2e6e5.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants