Re: Possible /etc/hosts parsing bug?

Mark Montague (monty@gg.caltech.edu)
18 Nov 1996 06:41:03 GMT


Mike <mcumings@ecst.csuchico.edu> writes:

>172.016.002.003 Fusion.shocking.com

>the IP that it was using was 172.14.2.3. When the extra '0's were deleted
>ping worked fine. Is this within the operating specs? Just curious,

from HPUX9 hosts(4) man page:

Network addresses are specified in the conventional Internet dot
notation using the inet_addr() routine from the Internet address
manipulation library (see inet(3N)). Host names can contain any
printable character other than a white space, newline, or comment
character.

from HPUX9 inet(3) man page:

All numbers supplied as parts in dot notation can be decimal, octal,
or hexadecimal, as specified in the C language (i.e., a leading 0x or
0X implies hexadecimal; a leading 0 implies octal; otherwise, the
number is interpreted as decimal).

So it sounds like it's a "feature."

- M

-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-
Mark "Monty" Montague | monty@gg.caltech.edu | I don't do Windows(tm)
-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-
DON'T PANIC! I'm a trained professional, and far more | *Why* question
qualified to panic in this situation than you are. | authority?
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-