Re: Possible /etc/hosts parsing bug?
Chris Thornhill (firstname.lastname@example.org)
Mon, 18 Nov 1996 02:13:58 -0400 (AST)
> 172.016.002.003 Fusion.shocking.com
> Numerically, these have the same values, but when I tried to ping fusion,
> the IP that it was using was 188.8.131.52. When the extra '0's were deleted
> ping worked fine. Is this within the operating specs? Just curious,
Due to the leading zero, the values are being interpreted as octal values,
and hence are not the same values.
This is normal for all IP parsing. The inet_addr function can interpret
a large variety of IP formats. In fact you could even include the decimal
value 2886730243 as your IP. :)
- Chris Thornhill