Bug 113628 - getaddrinfo no longer resolves 0 as 0.0.0.0 aka localhost
Summary: getaddrinfo no longer resolves 0 as 0.0.0.0 aka localhost
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 9
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2004-01-15 22:57:10 UTC
Embargoed:


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 0.0.0.0 aka
localhost. In my experience, previous versions did. The 
gethostbyname*() functions still do resolve 0 as 0.0.0.0.

I used a little testprog I will attach.


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

How reproducible:
Always

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

    

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

Expected Results:  gethostbyname: 0.0.0.0
getaddrinfo: 0.0.0.0

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.