Skip to content

libnftnl updates

Pablo Neira Ayuso netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7src: early attribute type validation in nft_*_attr_setinclude/libnftnl/chain.h include/libnftnl/rule.h include/libnftnl/set.h +5 more+23 -110 replies
2/7src: add assertion infrastructure to validate attribute typessrc/internal.h src/utils.c+20 -00 replies
3/7src: add nft_*_attr_{set|get}_data interfaceMake_global.am include/libnftnl/chain.h include/libnftnl/expr.h +8 more+212 -280 replies
4/7src: fix wrong type in NFT_ATTR_*_FAMILYsrc/chain.c src/rule.c src/table.c +5 more+26 -260 replies
5/7include: get linux/netfilter/nf_tables.h in sync with kernel headerinclude/linux/netfilter/nf_tables.h+2 -10 replies
6/7example: nft-rule-add: simplify exampleexamples/nft-rule-add.c+29 -570 replies
7/7rule: add NFT_RULE_ATTR_USERDATA supportinclude/libnftnl/rule.h include/linux/netfilter/nf_tables.h src/rule.c+62 -20 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/7] libnftnl updates

This batch contains updates for libnftnl:

* add implicit bugtrap for undefined set operations. Gcc will spot a compilation warning if attribute is not defined in the switch in nft_*_attr_set.

* add assertion infrastructure to validate attribute size.

* Add nft_*_attr_{set|get}_data to allow setting data of variable length. This includes validation of the attribute size. This new interface supersedes nft_*_attr_{set|get}. It is required by the per-rule userdata infrastructure.

* Fix wrong family attribute type uncovered by the validation added + existing test infrastructure.

* Get in sync with current linux kernel header (as of 3.14-rc).

* Simplify the overly complicated nft-rule-add example. This should help to merge the nft-rule-insert example into nft-rule-add.

* add support for NFT_RULE_ATTR_USERDATA, which allows nft to attach human-readable comments.

Pablo Neira Ayuso (7):
src: early attribute type validation in nft_*_attr_set
src: add assertion infrastructure to validate attribute types
src: add nft_*_attr_{set|get}_data interface
src: fix wrong type in NFT_ATTR_*_FAMILY
include: get linux/netfilter/nf_tables.h in sync with kernel header
example: nft-rule-add: simplify example
rule: add NFT_RULE_ATTR_USERDATA support

 Make_global.am			     |	  2 +-
 examples/nft-rule-add.c	     |	 86 ++++++++----------------
 include/libnftnl/chain.h	     |	  6 ++
 include/libnftnl/expr.h	     |	  2 +
 include/libnftnl/rule.h	     |	  7 ++
 include/libnftnl/set.h		     |	  6 ++
 include/libnftnl/table.h	     |	  6 ++
 include/linux/netfilter/nf_tables.h |	  8 ++-
 src/chain.c			     |	 83 ++++++++++++++++++-----
 src/internal.h			     |	 13 ++++
 src/libnftnl.map		     |	 11 +++
 src/rule.c			     |	125 +++++++++++++++++++++++++++++++----
 src/set.c			     |	 47 +++++++++++--
 src/table.c			     |	 50 ++++++++++----
 src/utils.c			     |	  7 ++
 tests/nft-chain-test.c		     |	  6 +-
 tests/nft-expr_ct-test.c	     |	  6 +-
 tests/nft-expr_exthdr-test.c	     |	  6 +-
 tests/nft-expr_meta-test.c	     |	  4 +-
 tests/nft-table-test.c		     |	  6 +-
 20 files changed, 368 insertions(+), 119 deletions(-)

--
1.7.10.4