netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft 0/3] parser: allow to define maps that contain ct objects
@ 2024-03-01 12:59 Florian Westphal
  2024-03-01 12:59 ` [PATCH nft 1/3] parser: allow to define maps that contain timeouts and expectations Florian Westphal
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Florian Westphal @ 2024-03-01 12:59 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

This allows to store ct object references in maps.
This is a userspace only change.

The only kernel patch required to make the test case work on nf.git
is netfilter: nft_ct: fix l3num expectations with inet pseudo family,
else ct expectations in inet family get rejected.

Note that the second patch is the opposite of what we agreed on at
NFWS, this is also why its both separate and has a very large
wall-of-text commit message.

I did not find a way to solve this without kernel patches in a sane
way.

I could still make it work with the new postfix keywords mentioned
in patch 2 commit message, but it would need a lot of guesswork and
special casing to figure out when to add the "right" postfix keyword.

Please see patch 2 for details and rationale wrt. chosen solution.

Florian Westphal (3):
  parser: allow to define maps that contain timeouts and expectations
  parser: allow to define maps that contain ct helpers
  tests: add test case for named ct objects

 src/parser_bison.y                            | 25 ++++-
 .../testcases/maps/dumps/named_ct_objects.nft | 71 ++++++++++++++
 tests/shell/testcases/maps/named_ct_objects   | 94 +++++++++++++++++++
 3 files changed, 185 insertions(+), 5 deletions(-)
 create mode 100644 tests/shell/testcases/maps/dumps/named_ct_objects.nft
 create mode 100755 tests/shell/testcases/maps/named_ct_objects

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-01 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-01 12:59 [PATCH nft 0/3] parser: allow to define maps that contain ct objects Florian Westphal
2024-03-01 12:59 ` [PATCH nft 1/3] parser: allow to define maps that contain timeouts and expectations Florian Westphal
2024-03-01 12:59 ` [PATCH nft 2/3] parser: allow to define maps that contain ct helpers Florian Westphal
2024-03-01 12:59 ` [PATCH nft 3/3] tests: add test case for named ct objects Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).