OSDN Git Service

netfilter: nftables: netlink support for several set element expressions
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 7 Dec 2020 16:37:14 +0000 (17:37 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 12 Dec 2020 18:20:52 +0000 (19:20 +0100)
commit48b0ae046ee96eac999839f6d26c624b8c93ed66
treeaca93688b8f9d6b909d8b6634f03d2e9b7ccb6e0
parent563125a73ac30d7036ae69ca35c40500562c1de4
netfilter: nftables: netlink support for several set element expressions

This patch adds three new netlink attributes to encapsulate a list of
expressions per set elements:

- NFTA_SET_EXPRESSIONS: this attribute provides the set definition in
  terms of expressions. New set elements get attached the list of
  expressions that is specified by this new netlink attribute.
- NFTA_SET_ELEM_EXPRESSIONS: this attribute allows users to restore (or
  initialize) the stateful information of set elements when adding an
  element to the set.
- NFTA_DYNSET_EXPRESSIONS: this attribute specifies the list of
  expressions that the set element gets when it is inserted from the
  packet path.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c
net/netfilter/nft_dynset.c