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

Comments

Projects
None yet
5 participants
@gopherbot
Copy link

commented Sep 29, 2011

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

This comment has been minimized.

Copy link
Member

commented Sep 29, 2011

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

This comment has been minimized.

Copy link
Member

commented Oct 3, 2011

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

This comment has been minimized.

Copy link
Contributor

commented Oct 6, 2011

Comment 3:

Status changed to HelpWanted.

@rsc

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Dec 9, 2011

Comment 5:

Labels changed: added priority-later.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 12, 2011

Comment 6:

Labels changed: added priority-go1.

@robpike

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2012

Comment 7:

Owner changed to builder@golang.org.

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Jan 15, 2012

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

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2012

Comment 9:

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

@gopherbot

This comment has been minimized.

Copy link
Author

commented Jul 23, 2012

Comment 10 by siyabonga.dlamini:

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

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2012

Comment 11:

Labels changed: added go1.1.

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Oct 29, 2012

Comment 12:

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

Status changed to Started.

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Nov 7, 2012

Comment 13:

This issue was closed by revision eb2e6e5.

Status changed to Fixed.

@gopherbot gopherbot added fixed labels Nov 7, 2012

@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.
You can’t perform that action at this time.