Problem with ipfw table add

Julian Elischer julian at
Sun May 18 04:13:30 UTC 2014

On 5/17/14, 9:44 PM, Alexander V. Chernikov wrote:
> On 13.05.2014 16:05, Dennis Yusupoff wrote:
>> I think that universal table for all kind of data (ipv4, ipv6, ports,
>> etc) is a bad idea by design. At least unless you haven't any 
>> ability to
> It is not always "universal" in kernel.
> Actually, different radix tables are used to store both IPv4 and 
> IPv6 in single table.
>> specify address family on add, to avoid attempts to guess what user
>> meant. Something like "ipfw table X add DEEF.DE ipv6".
> I'm going to add explicit table type/naming setup soon.
> Idea is the following:
> 1) Existing table can be named and addressed by either number or name.
> However, you still need to assign table number manually.
> 2) Table type/name can be specified explicitly via one of the 
> following commands:
> * ipfw table 1 create [type <cidr|u32|ifindex|iface>] [name 
> "table_name"]
type "ports" would be nice   but tricky to do right.

> * ipfw table <num|name> name "table_name"
> * ipfw table "table_name" type <cidr|u32|ifindex|iface>
> 3) ipfw(8) stops trying to guess appropriate type based on used 
> value. Instead,
> it requests table type from kernel and interprets value according to 
> returned type.
> Default type for all tables is cidr

the guessing was a hack for compatibilty. Its time to stop doing that 
has definitely come.
(I did it.. sorry)

> 4) Table(s) can be returned to default values using ipfw table 
> <num|all|name> destroy.
> Destroy means:
> * flush
> * table tries (or other structures) freed
> * type set to cidr
>> 13.05.2014 14:32, Alexander V. Chernikov пишет:
>>> On 13.05.2014 13:46, Dennis Yusupoff wrote:
>>>> May be this will help? See answer on
>>> I'll try to fix it within a few days.
> Fixed in r266310.
>>> The problem itself happens due to the fact that every CIDR table
>>> address is packed into IPv6 address and IPv4 ones are encoded as
>>> deprecated IPv6-compatible ones.
>>> this leads to the problems with decoding things like 0/X or ::1
> _______________________________________________
> freebsd-net at mailing list
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at"

More information about the freebsd-net mailing list