From owner-freebsd-net@FreeBSD.ORG Sat Mar 15 00:51:28 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0C50106566B for ; Sat, 15 Mar 2008 00:51:28 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outX.internet-mail-service.net (outX.internet-mail-service.net [216.240.47.247]) by mx1.freebsd.org (Postfix) with ESMTP id 96C208FC20 for ; Sat, 15 Mar 2008 00:51:28 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Fri, 14 Mar 2008 17:51:28 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 89A7A2D6EA4 for ; Fri, 14 Mar 2008 17:46:35 -0700 (PDT) Message-ID: <47DB1C6A.8050908@elischer.org> Date: Fri, 14 Mar 2008 17:46:34 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <20080314232456.GQ91152@hal.rescomp.berkeley.edu> In-Reply-To: <20080314232456.GQ91152@hal.rescomp.berkeley.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Behavior of `ipfw table n list' in 7.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 00:51:28 -0000 Christopher Cowart wrote: > Hello, > > I've been debugging some scripts for the better part of the hour, and > finally figured out what's going on. > > On 6.2, `ipfw table 3 list' outputs: > 169.229.127.61/32 100127061 > > But on 7.0, `ipfw table 4 list' outputs: > 10.9.156.254/32 11.237.178.84 > > They're different tables with different values, but what's shocking is > the change to dotted-quad representation on 7.0. > > I notice in ipfw(8) on 7.0, tablearg is now a valid value to fwd. The > thing is, according to the 'LOOKUP TABLES' section of the man page, > "Associated with each entry is a 32-bit unsigned value". It's very > explicitly *not* an IP address, because tablearg can be used for all > sorts of other things, like indexing pipes, specifying tag values, or in > my case, holding netgraph cookies. > > It's not a big deal -- I already had an ip_to_number function in my > shell library, and now that I know what the issue is, I can deal with > it. > > I wanted to bring it up, because printing something that's not an IP > address in dotted-quad notation seems misleading and confusing. > I think the dotted quad part is mentioned somewhere, but anyhow a patch was put in to add a specific option to ipfw(8) to request the quad notation If you get a new version of ipfw(8) it should have the fix.. Or pull the fix from the freebsd source cvs web page.. pull and apply the diff for revision 1.114 from the following page http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/ipfw/ipfw2.c and apply it and then reinstall it. that reminds me I need to merge this back to RELENG_7