[Bug libc/5460] glibc-2.6+ returns too many results from /etc/hosts in some cases

vapier at gentoo dot org sourceware-bugzilla@sourceware.org
Sun Dec 9 04:36:00 GMT 2007


------- Additional Comments From vapier at gentoo dot org  2007-12-09 04:36 -------
Created an attachment (id=2128)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2128&action=view)
getaddrinfo.c test case

running this test case on newer glibc's will show:
$ ./getaddrinfo localhost6
--- looking up 'localhost6' for family 0 (0)
getaddrinfo(...) = EAI_NONAME, trying again with AI_CANONNAME
getaddrinfo(...) = 0
getnameinfo(...) = 0
	name = 127.0.0.1
	service = 23
getnameinfo(...) = 0
	name = ::1
	service = 23
--- looking up 'localhost6' for family AF_INET (2)
getaddrinfo(...) = EAI_NONAME, trying again with AI_CANONNAME
getaddrinfo(...) = 0
getnameinfo(...) = 0
	name = 127.0.0.1
	service = 23
--- looking up 'localhost6' for family AF_INET6 (10)
getaddrinfo(...) = EAI_NONAME, trying again with AI_CANONNAME
getaddrinfo(...) = 0
getnameinfo(...) = 0
	name = ::1
	service = 23

on older glibc versions, that "127.0.0.1" entry wont crop up

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5460

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the Glibc-bugs mailing list