linux/include/uapi
Stefano Brivio f3a2181e16 netfilter: nf_tables: Support for sets with multiple ranged fields
Introduce a new nested netlink attribute, NFTA_SET_DESC_CONCAT, used
to specify the length of each field in a set concatenation.

This allows set implementations to support concatenation of multiple
ranged items, as they can divide the input key into matching data for
every single field. Such set implementations would be selected as
they specify support for NFT_SET_INTERVAL and allow desc->field_count
to be greater than one. Explicitly disallow this for nft_set_rbtree.

In order to specify the interval for a set entry, userspace would
include in NFTA_SET_DESC_CONCAT attributes field lengths, and pass
range endpoints as two separate keys, represented by attributes
NFTA_SET_ELEM_KEY and NFTA_SET_ELEM_KEY_END.

While at it, export the number of 32-bit registers available for
packet matching, as nftables will need this to know the maximum
number of field lengths that can be specified.

For example, "packets with an IPv4 address between 192.0.2.0 and
192.0.2.42, with destination port between 22 and 25", can be
expressed as two concatenated elements:

  NFTA_SET_ELEM_KEY:            192.0.2.0 . 22
  NFTA_SET_ELEM_KEY_END:        192.0.2.42 . 25

and NFTA_SET_DESC_CONCAT attribute would contain:

  NFTA_LIST_ELEM
    NFTA_SET_FIELD_LEN:		4
  NFTA_LIST_ELEM
    NFTA_SET_FIELD_LEN:		2

v4: No changes
v3: Complete rework, NFTA_SET_DESC_CONCAT instead of NFTA_SET_SUBKEY
v2: No changes

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2020-01-27 08:54:30 +01:00
..
asm-generic arch: sembuf.h: make uapi asm/sembuf.h self-contained 2019-12-04 19:44:14 -08:00
drm drm/vmwgfx: Add surface dirty-tracking callbacks 2019-11-06 15:45:32 +01:00
linux netfilter: nf_tables: Support for sets with multiple ranged fields 2020-01-27 08:54:30 +01:00
misc habanalabs: expose reset counters via existing INFO IOCTL 2019-11-21 11:35:47 +02:00
mtd mtd: abi: do not use C++ style comments in uapi header 2019-07-07 20:31:29 +02:00
rdma RDMA/efa: Expose RDMA read related attributes 2019-11-25 10:31:48 -04:00
scsi scsi: use __u{8,16,32,64} instead of uint{8,16,32,64}_t in uapi headers 2019-08-12 22:19:27 -04:00
sound ALSA: compress: add flac decoder params 2019-11-18 13:02:25 +00:00
video
xen
Kbuild kbuild: re-implement Makefile.headersinst without recursion 2019-06-15 19:57:02 +09:00