From owner-freebsd-stable@FreeBSD.ORG Thu Oct 27 12:41:35 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 9625516A41F for ; Thu, 27 Oct 2005 12:41:35 +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 DB63A43D46 for ; Thu, 27 Oct 2005 12:41:34 +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 1EV74V-0001Cc-So; Thu, 27 Oct 2005 13:41:32 +0100 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 4.50) id 1EV74V-0006tk-4z; Thu, 27 Oct 2005 13:41:31 +0100 Date: Thu, 27 Oct 2005 13:41:31 +0100 (BST) From: Jan Grant X-X-Sender: cmjg@mail.ilrt.bris.ac.uk To: "Paul T. Root" In-Reply-To: <4360C6A7.2080502@iaces.com> Message-ID: References: <200510262307.j9QN7G7V014335@drugs.dv.isc.org> <4360C6A7.2080502@iaces.com> 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 , Mark Andrews , 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:41:35 -0000 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. I also found: [[[ STANDARDS The inet_ntop() and inet_pton() functions conform to X/Open Networking Services Issue 5.2 (``XNS5.2''). Note that inet_pton() does not accept 1-, 2-, or 3-part dotted addresses; all four parts must be specified and are interpreted only as decimal values. This is a narrower input set than that accepted by inet_aton(). ]]] on that same man page :-) Cheers, jan PS. I only raised the issue in case anyone else was bitten by it (which is why a PR might be handy). Having "fixed" /etc/hosts, I don't think this is worth wasting more energy on.