Skip to content

nftables remove use of meta nfproto

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10src: add alternate syntax for ct saddrinclude/ct.h include/expression.h src/ct.c +2 more+21 -60 replies
2/10src: ct: store proto base of ct key, if anyinclude/expression.h src/ct.c+14 -00 replies
3/10src: ct: add eval part to inject dependencies for ct saddr/daddrsrc/ct.c src/evaluate.c+77 -190 replies
4/10src: unifiy meta and ct postprocessingsrc/netlink_delinearize.c+22 -280 replies
5/10tests: update inet/bridge icmp test casetests/py/bridge/icmpX.t tests/py/inet/icmpX.t+4 -40 replies
6/10src: ct: print nfproto name for some header fieldssrc/ct.c+23 -50 replies
7/10tests: ct: adjust test case commandstests/py/inet/ct.t tests/py/inet/ct.t.payload tests/py/ip/ct.t +1 more+24 -210 replies
8/10src: rt: add keyword distinction for nexthop vs nexthop6src/evaluate.c src/parser_bison.y src/rt.c+45 -150 replies
9/10tests: rt: fix test casestests/py/inet/rt.t tests/py/inet/rt.t.payload tests/py/ip/rt.t +1 more+12 -70 replies
10/10doc: update man pagedoc/nft.xml+18 -50 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPablo Neira Ayuso
SeriesA-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH nft 0/10] nftables remove use of meta nfproto

inet family (and others, e.g. bridge) lack context to figure out the layer 3 address type.

examples:
ct original saddr $addr
rt nexthop $addr

We can't use $addr, because it might be a set reference, e.g.

ct original saddr @whitelist

currently implemented workaround is to use 'meta nfproto' to provide the l3 context, e.g.

meta nfproto ip rt nexthop 10.2.3.4

i.e. users need to fill dependency manually.

Pablo suggested to instead specify ip saddr, ip6 saddr:

ct original ip saddr $address

and then let nft handle the dependency injection.

This series does just that.

Old syntax is preserved.

 doc/nft.xml                |   23 ++++++++---
 include/ct.h               |    3 -
 include/expression.h       |    2 
 src/ct.c                   |   70 ++++++++++++++++++++++++----------
 src/evaluate.c             |   92 +++++++++++++++++++++++++++++++++++----------
 src/netlink_delinearize.c  |   52 +++++++++++--------------
 src/parser_bison.y         |   42 ++++++++++++++++++--
 src/rt.c                   |   14 ++++++
 tests/py/bridge/icmpX.t    |    4 -
 tests/py/inet/ct.t         |    7 ++-
 tests/py/inet/ct.t.payload |    4 -
 tests/py/inet/icmpX.t      |    4 -
 tests/py/inet/rt.t         |   10 +++-
 tests/py/inet/rt.t.payload |    4 -
 tests/py/ip/ct.t           |   18 ++++----
 tests/py/ip/ct.t.payload   |   16 +++----
 tests/py/ip/rt.t           |    3 -
 tests/py/ip6/rt0.t         |    2 
 18 files changed, 260 insertions(+), 110 deletions(-)