diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2020-01-30 01:16:33 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-02-05 15:49:11 +0100 |
commit | 7cd41b5387acf84088e9299a796f7c2c72339a1a (patch) | |
tree | 853dc73aedbd68ff86184a581137489e867b9d31 /include/set.h | |
parent | 131a6c2fa4cccaa04a7b93b686f10f5ba6f11b3d (diff) |
set: Add support for NFTA_SET_DESC_CONCAT attributes
If NFTNL_SET_DESC_CONCAT data is passed, pass that to the kernel
as NFTA_SET_DESC_CONCAT attributes: it describes the length of
single concatenated fields, in bytes.
Similarly, parse NFTA_SET_DESC_CONCAT attributes if received
from the kernel.
This is the libnftnl counterpart for nftables patch:
src: Add support for NFTNL_SET_DESC_CONCAT
v4:
- move NFTNL_SET_DESC_CONCAT to the end of enum nftnl_set_attr
to avoid ABI breakage (Pablo Neira Ayuso)
v3:
- use NFTNL_SET_DESC_CONCAT and NFTA_SET_DESC_CONCAT instead of a
stand-alone NFTA_SET_SUBKEY attribute (Pablo Neira Ayuso)
- pass field length in bytes instead of bits, fields would get
unnecessarily big otherwise
v2:
- fixed grammar in commit message
- removed copy of array bytes in nftnl_set_nlmsg_build_subkey_payload(),
we're simply passing values to htonl() (Phil Sutter)
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/set.h')
-rw-r--r-- | include/set.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/set.h b/include/set.h index 446acd2..895ffdb 100644 --- a/include/set.h +++ b/include/set.h @@ -25,6 +25,8 @@ struct nftnl_set { enum nft_set_policies policy; struct { uint32_t size; + uint8_t field_len[NFT_REG32_COUNT]; + uint8_t field_count; } desc; struct list_head element_list; |