Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157286 - Odd behavior with hostnames with leading or trainling dashes (hyphens)
Summary: Odd behavior with hostnames with leading or trainling dashes (hyphens)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL: http://www.netalive.org/topics/32153
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-05 21:44 UTC by Mark Purtill
Modified: 2006-12-06 09:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Purtill 2006-12-05 21:44:17 UTC
% host -- -brainfreeze-.blogspot.com
-brainfreeze-.blogspot.com is an alias for blogspot.l.google.com.
blogspot.l.google.com has address 72.14.219.191
-brainfreeze-.blogspot.com is an alias for blogspot.l.google.com.
-brainfreeze-.blogspot.com is an alias for blogspot.l.google.com.
% ping -- -brainfreeze-.blogspot.com
ping: unknown host -brainfreeze-.blogspot.com
% ping 72.14.219.191
PING 72.14.219.191 (72.14.219.191) 56(84) bytes of data.
64 bytes from 72.14.219.191: icmp_seq=1 ttl=241 time=115 ms
64 bytes from 72.14.219.191: icmp_seq=2 ttl=241 time=116 ms
...

Firefox also cannot see -brainfreeze-.blogspot.com, which is how I originally noticed the problem, but it has nothing to do with firefox.

According to the discussion at the url <http://www.netalive.org/topics/32153>, hostnames like this are not valid according to the relevant standard; however, they do seem to be out there (the url gives another, which I haven't tested), and MS Windows allows them, so probably linux has to allow them too.  The discussion there also suggests glibc where the check is being done, and gives a workaround (putting the site in question in /etc/hosts) which seems to work.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-12-05 23:51:06 UTC
These hostnames break RFCs and are not valid -> the only bug is with people using them.
Comment 2 Mark Purtill 2006-12-06 09:53:04 UTC
As I implied in my original message, I think that's a short sighted attitude.  But, whatever, I tried.