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.
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.
gethostbyname() fails to resolve domain names with minus sign at beginning or end of domain name, .com, while it can be resolved using host and nslookup.
in example -kol.deviantart
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. insa.pp. ru/files/ bugs/gethost. c
So i wrote C test example that can be found at http://
Tested on Debian 3.1, Debian 4, FreeBSD 5.4. All i386.
Mac OS X not affected.