This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4671] New: gethostbyname() cant resolve names starting/ending with "-"
- From: "nikolaeff at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 20 Jun 2007 17:18:57 -0000
- Subject: [Bug libc/4671] New: gethostbyname() cant resolve names starting/ending with "-"
- Reply-to: sourceware-bugzilla at sourceware dot org
gethostbyname() fails to resolve domain names with minus sign at beginning or end of domain name,
in example -kol.deviantart.com, while it can be resolved using host and nslookup.
example sessiong:
insa@devel:~$ ping -- -kol.deviantart.com
ping: unknown host -kol.deviantart.com
insa@devel:~$ host -- -kol.deviantart.com
-kol.deviantart.com has address 69.28.181.43
Breif look at linux iputils/ping.c shows that it's using gethostbyname() function.
So i wrote C test example that can be found at http://insa.pp.ru/files/bugs/gethost.c
Tested on Debian 3.1, Debian 4, FreeBSD 5.4. All i386.
Mac OS X not affected.
--
Summary: gethostbyname() cant resolve names starting/ending with
"-"
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: nikolaeff at gmail dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=4671
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.