Resolver doesn't like 1.2.3.04 in /etc/hosts

Mark Andrews Mark_Andrews at isc.org
Wed Oct 26 20:28:18 PDT 2005


> On 2005-10-26, Mark Andrews wrote:
> > 	Leading zeros are ambigious.  Some platforms treat them as octal
> > 	others treat them as decimal.
> 
> There is nothing ambiguous about the example provided.  (Perhaps
> it wasn't a good example, but it's always a bug if '04' is not
> correctly decoded, regardless of the numeric base in use.)

	You want a ambigious example?

		192.168.222.012

	Seen this sort of thing in real life when the admin wanted
	to make the file look pretty and they wanted 12 for the last
	octet not 10.

	Seen boxes that used %03u.%03u.%03u.%03u to print out the
	octets.

	It's much easier to just reject octal and hexadecimal than
	to work out when and when not it is ambigious.  It is also
	better to demand all 4 octets.  It also generates less
	support complaints.

	Mark

> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark_Andrews at isc.org


More information about the freebsd-stable mailing list