Skip to content

RFC add NFTA_SET_ELEM_KEY_END

Pablo Neira Ayuso netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netfilter: nf_tables: add nft_setelem_parse_key()net/netfilter/nf_tables_api.c+32 -244 replies
2/2netfilter: nf_tables: add NFTA_SET_ELEM_KEY_END attributeinclude/net/netfilter/nf_tables.h include/uapi/linux/netfilter/nf_tables.h net/netfilter/nf_tables_api.c +1 more+76 -243 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH,nf-next RFC 0/2] add NFTA_SET_ELEM_KEY_END

Hi Stefano,

This patchset extends the netlink API to allow to express an interval with one single element.

This simplifies this interface since userspace does not need to send two independent elements anymore, one of the including the NFT_SET_ELEM_INTERVAL_END flag.

The idea is to use the _DESC to specify that userspace speaks the kernel that new API representation. In your case, the new description attribute that tells that this set contains interval + concatenation implicitly tells the kernel that userspace supports for this new API.

If you're fine with this, I can scratch a bit of time to finish the libnftnl part. The nft code will need a small update too. You will not need to use the nft_set_pipapo object as scratchpad area anymore.

Compile-tested only.

Let me know, thanks.

Pablo Neira Ayuso (2):
netfilter: nf_tables: add nft_setelem_parse_key()
netfilter: nf_tables: add NFTA_SET_ELEM_KEY_END attribute

 include/net/netfilter/nf_tables.h        |  14 +++-
 include/uapi/linux/netfilter/nf_tables.h |   2 +
 net/netfilter/nf_tables_api.c            | 134 +++++++++++++++++++++----------
 net/netfilter/nft_dynset.c               |   2 +-
 4 files changed, 106 insertions(+), 46 deletions(-)

--
2.11.0