From owner-freebsd-stable@FreeBSD.ORG Mon Nov 25 15:47:59 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1685C670 for ; Mon, 25 Nov 2013 15:47:59 +0000 (UTC) Received: from isis.morrow.me.uk (isis.morrow.me.uk [204.109.63.142]) by mx1.freebsd.org (Postfix) with ESMTP id E70D522F6 for ; Mon, 25 Nov 2013 15:47:58 +0000 (UTC) Received: from anubis.morrow.me.uk (host109-145-254-96.range109-145.btcentralplus.com [109.145.254.96]) (Authenticated sender: mauzo) by isis.morrow.me.uk (Postfix) with ESMTPSA id 4B52D4509D for ; Mon, 25 Nov 2013 15:41:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 isis.morrow.me.uk 4B52D4509D DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=morrow.me.uk; s=dkim201101; t=1385394080; bh=vMZs/SnrNHm7/7jK8ct6ICOLUAg9O/+8HrKmO0tYlvk=; h=Date:From:To:Subject:References:In-Reply-To; b=RC+xNN1RQiZoowjKiu7yywlVxPBdB2L5+VsQSSJ+AJXA86pLzW3TQyttnoMkdO+W3 /VWHJ6daw8BMlBJtSIvRtxdjJeoffVTpETmTEjsqD8CH73C3a7AdNIqKtnAZKKnlx+ QBFVKf6V1hEguSAVMoSRWqUxrcrUn4tmeDAOcacU= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.98 at isis.morrow.me.uk Received: by anubis.morrow.me.uk (Postfix, from userid 5001) id E63F8F5ED; Mon, 25 Nov 2013 15:41:15 +0000 (GMT) Date: Mon, 25 Nov 2013 15:41:15 +0000 From: Ben Morrow To: freebsd-stable@freebsd.org Subject: Re: ipfw table add problem Message-ID: <20131125154110.GA32738@anubis.morrow.me.uk> References: <52911993.8010108@ipfw.ru> <529259DE.2040701@FreeBSD.org> <20131125152238.S78756@sola.nimnet.asn.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1385391778.1220.4.camel@revolution.hippie.lan> X-Newsgroups: gmane.os.freebsd.devel.ipfw,gmane.os.freebsd.stable User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:47:59 -0000 Quoth Ian Lepore : > On Mon, 2013-11-25 at 15:30 +1100, Ian Smith wrote: > > On Sun, 24 Nov 2013 23:56:14 +0400, Alexander V. Chernikov wrote: > > > > I'm wondering if "so don't do that" is really sufficient to deal with > > this? If it's not recognised as a valid address, shouldn't it fail to > > add anything, with a complaint? I don't see how a string containing > > dots can be seen as a valid unsigned integer? > > It's still not clear to me that inet_pton() is doing the right thing. > Per the rfc cited earlier in the thread, it's not supposed to interpret > the digits as octal or hex -- they are specifically declared to be > decimal numbers. There's nothing invalid about "01" as a decimal > number. The fact that many of us have a C-programming background and > tend to think of leading-zero as implying octal doesn't change that. OTOH having inet_pton and inet_aton treat 10.0.0.010 as different addresses would be rather confusing. Ben