Bug 113628 - getaddrinfo no longer resolves 0 as aka localhost
Summary: getaddrinfo no longer resolves 0 as aka localhost
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc   
(Show other bugs)
Version: 9
Hardware: i686 Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-01-15 22:35 UTC by Rob de Wit
Modified: 2016-11-24 15:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-01-15 22:57:10 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Little testprog using gethostbyname and getaddrinfo to resolve argv[1] (1.04 KB, text/plain)
2004-01-15 22:37 UTC, Rob de Wit
no flags Details

Description Rob de Wit 2004-01-15 22:35:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5)
Gecko/20031007 Firebird/0.7

Description of problem:
With glic2.3.2 getaddrinfo() no longer resolves 0 as aka
localhost. In my experience, previous versions did. The 
gethostbyname*() functions still do resolve 0 as

I used a little testprog I will attach.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. compile my testprog 
2. run it with argument '0': ./a.out '0'


Actual Results:  Output of my testporg:
getaddrinfo: 0 unresolvable: Name or service not known

Expected Results:  gethostbyname:

Additional info:

If this resolving issue is changed intentionally, I would have
appreciated it, if there had been some kind of documentation about the
change in this minor version upgrade. glibc2.3.1 still acts the way I
am used to.

Comment 1 Rob de Wit 2004-01-15 22:37:30 UTC
Created attachment 97044 [details]
Little testprog using gethostbyname and getaddrinfo to resolve argv[1]

Comment 2 Jakub Jelinek 2004-01-15 22:57:10 UTC
Your testcase is buggy, a->ai_addr points to struct sockaddr_in in
your case, not IP itself.
Works for me just fine (after fixing that bug) with glibc-2.3.2-101.4 and glibc-2.3.2-95.6.

Comment 3 Rob de Wit 2004-01-16 11:54:15 UTC
Please accept my excuses for sending in faulty code,
I never got to that part of the code, because in my case the
getaddrinfo() functions just failed (and still does).

Note You need to log in before you can comment on or make changes to this bug.