[PATCH 0/3] add userdata and comment support for chains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch series adds userdata storage for chains and also support
for comments when adding a chain.

Userdata can be extended for other purposes in the future.

nftables patch relies on already_set[1] function to check for possible
duplicates when specifying a comment.

[1] https://patchwork.ozlabs.org/project/netfilter-devel/patch/20200910164019.86192-1-guigom@xxxxxxxxxx/


nf-next:

  netfilter: nf_tables: add userdata attributes to nft_chain

 include/net/netfilter/nf_tables.h        |  2 ++
 include/uapi/linux/netfilter/nf_tables.h |  2 ++
 net/netfilter/nf_tables_api.c            | 19 +++++++++++++++++++
 3 files changed, 23 insertions(+)

libnftnl:

  chain: add userdata and comment support

 include/libnftnl/chain.h            |  1 +
 include/libnftnl/udata.h            |  6 ++++++
 include/linux/netfilter/nf_tables.h |  2 ++
 src/chain.c                         | 31 +++++++++++++++++++++++++++++
 4 files changed, 40 insertions(+)

nftables:

  src: add comment support for chains

 include/rule.h                                |  1 +
 src/mnl.c                                     | 11 +++++++
 src/netlink.c                                 | 32 +++++++++++++++++++
 src/parser_bison.y                            |  8 +++++
 src/rule.c                                    |  3 ++
 .../testcases/optionals/comments_chain_0      | 12 +++++++
 .../optionals/dumps/comments_chain_0.nft      |  5 +++
 7 files changed, 72 insertions(+)
 create mode 100755 tests/shell/testcases/optionals/comments_chain_0
 create mode 100644 tests/shell/testcases/optionals/dumps/comments_chain_0.nft


-- 
2.27.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux