Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Oct 2005 14:41:07 +0100 (BST)
From:      Jan Grant <Jan.Grant@bristol.ac.uk>
To:        "Paul T. Root" <ptroot@iaces.com>
Cc:        Greg Black <gjb@gbch.net>, Mark Andrews <Mark_Andrews@isc.org>, freebsd-stable@freebsd.org
Subject:   Re: Resolver doesn't like 1.2.3.04 in /etc/hosts
Message-ID:  <Pine.GSO.4.62.0510271437450.10652@mail.ilrt.bris.ac.uk>
In-Reply-To: <4360CC05.2070907@iaces.com>
References:  <200510262307.j9QN7G7V014335@drugs.dv.isc.org> <Pine.GSO.4.62.0510271304060.10652@mail.ilrt.bris.ac.uk> <4360C6A7.2080502@iaces.com> <Pine.GSO.4.62.0510271338440.10652@mail.ilrt.bris.ac.uk> <4360CC05.2070907@iaces.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Oct 2005, Paul T. Root wrote:

> Jan Grant wrote:
> > 
> > On Thu, 27 Oct 2005, Paul T. Root wrote:
> > 
> > 
> > > man inet_addr
> > > 
> > > and you'll find:
> > > 
> > > All numbers supplied as ``parts'' in a `.' notation may be decimal,
> > > octal, or hexadecimal, as specified in the C language (i.e., a leading
> > > 0x or 0X implies hexadecimal; otherwise, a leading 0 implies octal;
> > > otherwise, the number is interpreted as decimal).
> > > 
> > > 
> > > So a leading zero means hex. Stop trying to make it look pretty.
> > > 
> > > Standards are a good thing and need to be followed.

[ "STANDARDS" section from the man page snipped ]

> Sure but the hosts(5) man page says that it follows inet_addr(3) spec.
> Sorry, I neglected to put that little leap in.

You're right. So, we appear to agree that either the man page for 
hosts(5) is in need of an update, or the resolver is currently not 
conforming to the described behaviour? Since

	1.2.3.04	foo

is currently an illegal /etc/hosts entry.

Cheers,


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
They modified their trousers secretly.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.62.0510271437450.10652>