]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r232865, r232868, r233478
authormelifaro <melifaro@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 24 Apr 2012 07:01:34 +0000 (07:01 +0000)
committermelifaro <melifaro@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 24 Apr 2012 07:01:34 +0000 (07:01 +0000)
commit8c717bf38be7814a61a6f5a87c76721f7e73967e
treee5e9a16e5c4b7c4e680bf7dbb9404ebb831bcfa9
parentcca9dfb16124a47cf07648cda9e20138d9f12847
MFC r232865, r232868, r233478

- Add ipfw eXtended tables permitting radix to be used for any kind of keys.
- Add support for IPv6 and interface extended tables
- Make number of tables to be changed in runtime in range 0..65534.
- Use IP_FW3 opcode for all new extended table cmds

No ABI changes are introduced. Old userland will see valid tables for
IPv4 tables and no entries otherwise. Flush works for any table.

IP_FW3 socket option is used to encapsulate all new opcodes:
 /* IP_FW3 header/opcodes */
 typedef struct _ip_fw3_opheader {
        uint16_t opcode;        /* Operation opcode */
        uint16_t reserved[3];   /* Align to 64-bit boundary */
 } ip_fw3_opheader;

New opcodes added:
 IP_FW_TABLE_XADD, IP_FW_TABLE_XDEL, IP_FW_TABLE_XGETSIZE, IP_FW_TABLE_XLIST

ipfw(8) table argument parsing behavior is changed:
 'ipfw table 999 add some-unqualified-host' now assumes
 'some-unqualified-host' to be interface name instead of hostname.

New tunable:
 net.inet.ip.fw.tables_max controls number of table supported by ipfw in given
 VNET instance. 128 is still the default value.

Sysctl change:
  net.inet.ip.fw.tables_max is now read-write.

New syntax:
ipfw add skipto tablearg ip from any to any via table(42) in
ipfw add skipto tablearg ip from any to any via table(4242) out

This is a bit hackish, special interface name '\1' is used to signal interface
table number is passed in p.glob field.

Sponsored by Yandex LLC

Approved by:        kib(mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@234637 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/ipfw/ipfw.8
sbin/ipfw/ipfw2.c
sys/netinet/ip_fw.h
sys/netinet/ipfw/ip_fw2.c
sys/netinet/ipfw/ip_fw_private.h
sys/netinet/ipfw/ip_fw_sockopt.c
sys/netinet/ipfw/ip_fw_table.c