This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/14969] getaddrinfo() with AI_ADDRCONFIG replaces ::1 with 127.0.0.1
- From: "psimerda at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 17 Dec 2012 17:09:23 +0000
- Subject: [Bug network/14969] getaddrinfo() with AI_ADDRCONFIG replaces ::1 with 127.0.0.1
- Auto-submitted: auto-generated
- References: <bug-14969-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14969
--- Comment #1 from Pavel Åimerda <psimerda at redhat dot com> 2012-12-17 17:09:23 UTC ---
Testing script:
#!/usr/bin/python3
import sys
from socket import *
hosts = [
None,
"localhost",
"127.0.0.1",
"localhost4",
"::1",
"localhost6",
"195.47.235.3",
"2a02:38::1001",
"info.nix.cz",
"www.google.com",
]
for host in hosts:
print("getaddrinfo host=\"{}\" hints.ai_flags=AI_ADDRCONFIG:".format(host))
try:
for item in getaddrinfo(host, "http", AF_UNSPEC, SOCK_STREAM, SOL_TCP,
AI_ADDRCONFIG):
print(" {}".format(item[4][0]))
except gaierror as error:
print(" !! {} !!".format(error))
--
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.