From owner-freebsd-stable@FreeBSD.ORG Thu Oct 27 12:07:26 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 499E616A41F for ; Thu, 27 Oct 2005 12:07:26 +0000 (GMT) (envelope-from Jan.Grant@bristol.ac.uk) Received: from diri.bris.ac.uk (diri.bris.ac.uk [137.222.10.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id D82E643D48 for ; Thu, 27 Oct 2005 12:07:25 +0000 (GMT) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk ([137.222.16.62]) by diri.bris.ac.uk with esmtp (Exim 4.54) id 1EV6XQ-0000Iv-0S; Thu, 27 Oct 2005 13:07:21 +0100 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 4.50) id 1EV6XO-0004sA-7A; Thu, 27 Oct 2005 13:07:18 +0100 Date: Thu, 27 Oct 2005 13:07:18 +0100 (BST) From: Jan Grant X-X-Sender: cmjg@mail.ilrt.bris.ac.uk To: Mark Andrews In-Reply-To: <200510262307.j9QN7G7V014335@drugs.dv.isc.org> Message-ID: References: <200510262307.j9QN7G7V014335@drugs.dv.isc.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Jan Grant X-Spam-Score: -1.4 X-Spam-Level: - Cc: Greg Black , freebsd-stable@freebsd.org Subject: Re: Resolver doesn't like 1.2.3.04 in /etc/hosts X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2005 12:07:26 -0000 On Thu, 27 Oct 2005, Mark Andrews wrote: > > > 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 It amazed me that no RFC ever appears to have standardised this format (although it is alluded to in passing as being decimal in various other places). Eg, 1035 has: [[[ The RDATA section of an A line in a master file is an Internet address expressed as four decimal numbers separated by dots without any imbedded spaces (e.g., "10.2.0.52" or "192.0.5.6"). ]]] (although that's DNS zone file format, not /etc/hosts.) > 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. I'm happy to reject octal and hex too! Anyway, count this as one (minor) support gripe :-) Thanks for your time, jan -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44 (0)117 3317661 http://ioctl.org/jan/ stty intr ^m