Bug 113628 - getaddrinfo no longer resolves 0 as 0.0.0.0 aka localhost
getaddrinfo no longer resolves 0 as 0.0.0.0 aka localhost
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
9
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-15 17:35 EST by Rob de Wit
Modified: 2016-11-24 10:22 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-15 17:57:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 17:37 EST, Rob de Wit
no flags Details

  None (edit)
Description Rob de Wit 2004-01-15 17:35:02 EST
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 17:37:30 EST
Created attachment 97044 [details]
Little testprog using gethostbyname and getaddrinfo to resolve argv[1]
Comment 2 Jakub Jelinek 2004-01-15 17:57:10 EST
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 06:54:15 EST
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.