Resolver doesn't like 1.2.3.04 in /etc/hosts

Jan Grant Jan.Grant at bristol.ac.uk
Thu Oct 27 06:41:20 PDT 2005


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.


More information about the freebsd-stable mailing list