]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: switch registers to 32 bit addressing
authorPatrick McHardy <kaber@trash.net>
Sat, 11 Apr 2015 01:27:37 +0000 (02:27 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 13 Apr 2015 15:17:29 +0000 (17:17 +0200)
commite3fc9d81642655730e441232ab69f8d6c1767847
treee31908a41ad9ef0b575a466c2d8b2a9ca2b3bbe6
parent47766b9545504af120ae1d8137e12c060bee3532
netfilter: nf_tables: switch registers to 32 bit addressing

Switch the nf_tables registers from 128 bit addressing to 32 bit
addressing to support so called concatenations, where multiple values
can be concatenated over multiple registers for O(1) exact matches of
multiple dimensions using sets.

The old register values are mapped to areas of 128 bits for compatibility.
When dumping register numbers, values are expressed using the old values
if they refer to the beginning of a 128 bit area for compatibility.

To support concatenations, register loads of less than a full 32 bit
value need to be padded. This mainly affects the payload and exthdr
expressions, which both unconditionally zero the last word before
copying the data.

Userspace fully passes the testsuite using both old and new register
addressing.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
16 files changed:
include/net/netfilter/nf_tables.h
include/uapi/linux/netfilter/nf_tables.h
net/bridge/netfilter/nft_meta_bridge.c
net/ipv4/netfilter/nft_redir_ipv4.c
net/ipv6/netfilter/nft_redir_ipv6.c
net/netfilter/nf_tables_api.c
net/netfilter/nf_tables_core.c
net/netfilter/nft_bitwise.c
net/netfilter/nft_byteorder.c
net/netfilter/nft_ct.c
net/netfilter/nft_exthdr.c
net/netfilter/nft_immediate.c
net/netfilter/nft_lookup.c
net/netfilter/nft_meta.c
net/netfilter/nft_nat.c
net/netfilter/nft_payload.c