Messages in this thread | | | Date | Mon, 18 Nov 1996 21:38:16 -0500 | From | Neil Moore <> | Subject | Re: Possible /etc/hosts parsing bug? |
| |
> > > I have found something that may be a small parsing bug, but may > also be within the specs of its functionality... In my hosts file > I had a few entries: > > 172.16.2.1 Atomic.shocking.com > 172.16.2.2 Nuclear.shocking.com > 172.16.2.3 Fusion.shocking.com > > In an effort to line everything up and make it look pretty I modified the > previous lines to the following: > > 172.016.002.001 Atomic.shocking.com > 172.016.002.002 Nuclear.shocking.com > 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 172.14.2.3. When the extra '0's were deleted > ping worked fine. Is this within the operating specs? Just curious,
Any number beginning with `0' is usually considered to be in octal. 016(base 8)==14(base 10), hence the problems you were experiencing.
-- Version: 3.12 GCS/M/L d- s-:+ a--- C+++(++)>$ UL+(++)>++++$ P+++ L+++>++++$ E++ W-(--) N++ o-- K-- w--- O- M-- V-- PS+++? PE Y+ PGP-- t+* 5- X R tv--? b+>+++ DI D--- G e-(*)>++++ h r++>+++ y?
| |