]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r232865, r232868, r233478
authormelifaro <melifaro@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 Apr 2012 07:15:15 +0000 (07:15 +0000)
committermelifaro <melifaro@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 Apr 2012 07:15:15 +0000 (07:15 +0000)
commit7b633d59390d60bfe53c59d2e649b628eff5fcb2
treef89dbd8f8d685aa803a285c7303a97e2e7776a62
parent36743e9b407a49b4a6c0196c8b5ebf60f8b53a6d
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 host' now assumes '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/9@234597 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