Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 2008 16:24:56 -0700
From:      Christopher Cowart <ccowart@rescomp.berkeley.edu>
To:        freebsd-net@freebsd.org
Subject:   Behavior of `ipfw table n list' in 7.0
Message-ID:  <20080314232456.GQ91152@hal.rescomp.berkeley.edu>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080314232456.GQ91152>