This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/12377] getaddrinfo() should disregard link-local IPv6 addresses for AI_ADDRCONFIG purposes
- From: "psimerda at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 27 Jul 2012 14:01:21 +0000
- Subject: [Bug network/12377] getaddrinfo() should disregard link-local IPv6 addresses for AI_ADDRCONFIG purposes
- Auto-submitted: auto-generated
- References: <bug-12377-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12377
--- Comment #10 from Pavel Åimerda <psimerda at redhat dot com> 2012-07-27 14:01:21 UTC ---
Testing environment:
glibc-2.15-51.fc17.x86_64
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
qlen 1000
link/ether 52:54:00:8e:93:da brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
qlen 1000
link/ether 52:54:00:eb:e9:fb brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:ff:feeb:e9fb/64 scope link
valid_lft forever preferred_lft forever
IPv4 literal localhost test:
# ./gai 127.0.0.1
getaddrinfo 1( 127.0.0.1, NULL, ... )
ai_family=2, ai_socktype=1, ai_flags=32
getaddrinfo 1 => EAI_NONAME(-2)
error
IPv6 literal localhost test:
# ./gai ::1
getaddrinfo 1( 127.0.0.1, NULL, ... )
ai_family=2, ai_socktype=1, ai_flags=32
getaddrinfo 1 => EAI_NONAME(-2)
error
IPv4 DNS localhost test:
# ./gai localhost4
getaddrinfo 1( 127.0.0.1, NULL, ... )
ai_family=2, ai_socktype=1, ai_flags=32
getaddrinfo 1 => EAI_NONAME(-2)
error
IPv6 DNS localhost test:
# ./gai localhost6
getaddrinfo 1( 127.0.0.1, NULL, ... )
ai_family=2, ai_socktype=1, ai_flags=32
getaddrinfo 1 => EAI_NONAME(-2)
error
Neutral DNS test:
# ./gai localhost
getaddrinfo 1( 127.0.0.1, NULL, ... )
ai_family=2, ai_socktype=1, ai_flags=32
getaddrinfo 1 => EAI_NONAME(-2)
error
A quick test to see if it works normally *with* a global IPv4 address:
# ./gai localhost
getaddrinfo 1( 127.0.0.1, NULL, ... )
ai_family=2, ai_socktype=1, ai_flags=32
getaddrinfo 1 => Success(0)
family: AF_INET
sin_addr 0x0100007f sin_port 0x0000
Note: This only happens with this version if my gai.c uses AI_ADDRCONFIG.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.