Bug 433 - gethostbyname fails to resolve undotted decimal, hex and octal addresses
Summary: gethostbyname fails to resolve undotted decimal, hex and octal addresses
Status: RESOLVED WORKSFORME
Alias: None
Product: glibc
Classification: Unclassified
Component: network (show other bugs)
Version: 2.3.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-08 22:43 UTC by Mike Batchelor
Modified: 2019-04-10 12:17 UTC (History)
2 users (show)

See Also:
Host: "i386-redhat-linux" and "sparc-unknown-linux-gnu"
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Batchelor 2004-10-08 22:43:29 UTC
"telnet 0 25" stopped working after upgrading system from RH7.2 glibc 2.2.4 to
RHAS3 with glibc 2.3.2, and also after upgrading Ultra1 from Solaris 8 to RHAS3
with glibc 2.3.2.  Any undotted decimal, hexadecimal or octal IP address also
fails to resolve for apps using glibc 2.3.2's gethostbyname.  Apps that use
libresolv (ping, tracertoute) continue to operate as expected, and resolve
hostname '0' to IP address 0.0.0.0, which causes socket calls to connect to the
first local interface, usually lo0.  They can also resolve hex or octal
addresses.  Apps linked only against glibc 2.3.2 return "0: Name or service not
known" or "0xac1c3f0a: Name or service not known".

I have not used any glibc versions between 2.2.4 and 2.3.2 so I cannot pinpoint
when this change occurred.  I did a search in the bug list and didn't find
anything relevant, so here I am, posting a bug.
Comment 1 GOTO Masanori 2004-10-12 00:34:46 UTC
In the latest cvs, this report is already fixed.
I confirmed an old glibc 2.3.2 behaved as you mentioned.
Comment 2 Mike Batchelor 2004-10-12 18:25:43 UTC
Thanks for looking into this and posting a reply.  I now have glibc
2.3.3-20040420-r1 on my Sun Ultra2, and it exhibits the same behavior.  What
release of glibc do I need to obtain to get this fix you mentioned?  

Thanks.