From owner-freebsd-net@FreeBSD.ORG Fri Mar 14 23:24:56 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 C983F1065670 for ; Fri, 14 Mar 2008 23:24:56 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: from hal.rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id B543C8FC18 for ; Fri, 14 Mar 2008 23:24:56 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: by hal.rescomp.berkeley.edu (Postfix, from userid 1225) id 7A0EB3C04CE; Fri, 14 Mar 2008 16:24:56 -0700 (PDT) Date: Fri, 14 Mar 2008 16:24:56 -0700 From: Christopher Cowart To: freebsd-net@freebsd.org Message-ID: <20080314232456.GQ91152@hal.rescomp.berkeley.edu> Mail-Followup-To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K9fy5ol1Oes4Q/ix" Content-Disposition: inline Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.16 (2007-06-09) Subject: 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: Fri, 14 Mar 2008 23:24:56 -0000 --K9fy5ol1Oes4Q/ix Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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.=20 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. --=20 Chris Cowart Network Technical Lead Network & Infrastructure Services, RSSP-IT UC Berkeley --K9fy5ol1Oes4Q/ix Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iQIVAwUBR9sJSCPHEDszU3zYAQLdJg//X5h3t+asISUign3ds5seqHS6a7xPBB0f X/aGrFXM4LYt14Z4qMEvii+jBYHZIqWQHD9WNjr9zYamlyHvY1U6b/EUyD2rrbeo EGvWPl7ZlJJJp+4J/HVr/HwP/fRin+p7evzvKU727/UOk+plFWUCHvBHuyBgnzhD m4yjUWiwqmVf0De6Fxc7ERpu/oluFgnHc+H+/+sXw5+4ZvvGA0Q/Qyz6lfKyRwj0 ghBRsxnlH4LtnT+bFD62QDlZzYYm5KHz3A8J0pewAD2MdRtH+HSpeSymv6zsSbYf XZswVzhK6edoG5hjlPd36WaXufSqofgtLornclyNZ5Epzd8i+6hYXra9DsxzBPOQ 5qiDN/5585QSxuzsP1/Qk6jGCwrTZQHd93WfdJ+a/vr76EIOy3/rpVqIA8OKBnOt MY28kHgwIrDxA3vm2o8/xSy6CLGtM/UOwoHkDEUQfKix+zITcxMhulwP4HebZXiV sbNbMj5H6+zim2Wn0OzHHKxZt8f5NBxL3i8F2axK1uT8/9eiNnFX+h4aC8cGRVWh /yWta8RLdY4BZBA6VDKsq1MsX1sK5LJGzQoTH8Ajw9YD186HoAlFlIBvRcRJpmw3 TvZ+tJeU3I1OqtAFRLjCHFR7vKLMw31N0w2ja0fewQfBxb8Ti8EYwn9d9GhYdHy6 tFTP9iw/S4s= =mlKD -----END PGP SIGNATURE----- --K9fy5ol1Oes4Q/ix--