Skip to content

restrict meta nfproto to inet family

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tests: restrict ct saddr test to inet familytests/py/any/ct.t tests/py/any/ct.t.payload tests/py/inet/ct.t +1 more+23 -80 replies
2/4tests: remove two non-sensical rulestests/py/inet/ether.t tests/py/inet/ether.t.payload+0 -250 replies
3/4tests: restrict meta nfproto test cases to inet familytests/py/any/meta.t tests/py/any/meta.t.payload tests/py/inet/meta.t +2 more+36 -320 replies
4/4evaluate: reject meta nfproto outside of inet familydoc/nft.xml src/evaluate.c+22 -21 reply

Reviews trailers per patch

None of the 4 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/4
2/4
3/4
4/4

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/4] restrict meta nfproto to inet family

Pablo reports following test case failure:

any/ct.t: ERROR: line 94: src/nft add rule --debug=netlink ip6
test-ip6 output meta nfproto ipv4 ct original saddr 1.2.3.4: This rule should not have failed.

We can't find upper layer protocol in this case, but even if we'd "fix" this it is still non-sensical, as

meta nfproto ipv4

will never match except in the inet family and the ip family, but in the latter case it will always match so it has no effect).

So, first step is to move this to an inet specific test to get rid of the test case failure.

The followup changes then get rid of meta nfproto tests or move them to inet-family-only tests.

The last patch makes nft reject 'meta nfproto' in all families except inet, where this expression is needed in case one wants to explicitly restrict a rule to only ipv4 or ipv6.