Skip to content

support for several list and reset commands

Pablo Neira Ayuso netfilter-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 0 repliesNew
  2. v15 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5libnftables: add nft_run_cmd_release() helper and use itsrc/libnftables.c+17 -120 replies
2/5libnftables: split nft_run_cmd_from_buffer() in helper functionssrc/libnftables.c+43 -230 replies
3/5libnftables: use nft_run_cmds() in nft_run_cmd_from_filename()src/libnftables.c+5 -230 replies
4/5src: allow reset commands in batch with list and get commands onlyinclude/cmd.h src/cmd.c src/parser_bison.y +1 more+53 -60 replies
5/5libnftables: support for several reset commandsinclude/cmd.h src/cmd.c src/libnftables.c+63 -90 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH nft,v2 0/5] support for several list and reset commands

Hi,

Currently, it is not possible to run two reset commands in a batch, eg.

nft 'reset rules ip x y; add rule ip x y counter'

this fails because the cache logic gets confused with the requirements.

This approach runs each reset command separately, fetching one cache for each of them.

This series is a follow up to:

https://patchwork.ozlabs.org/project/netfilter-devel/list/?series=499127

to address an issue reported by Phil Sutter.

In this v2, this round simplifies the logic, allowing the combination of reset commands with list and get commands only by now.

Patch #1 to #3 consolidate common code between nft_run_cmd_from_filename() and nft_run_cmd_from_buffer().

Patch #4 add cmd_batch_add() and validate compatibility of reset command with list and get commands.

Patch #5 adds the cmd_batch shim object to collect sublists of commands to deal with several reset commands.

Pablo Neira Ayuso (5):
libnftables: add nft_run_cmd_release() helper and use it
libnftables: split nft_run_cmd_from_buffer() in helper functions
libnftables: use nft_run_cmds() in nft_run_cmd_from_filename()
src: allow reset commands in batch with list and get commands only
libnftables: support for several reset commands

 include/cmd.h      |   9 +++
 src/cmd.c          |  59 ++++++++++++++++++-
 src/libnftables.c  | 144 ++++++++++++++++++++++++++++-----------------
 src/parser_bison.y |  12 +++-
 src/parser_json.c  |   8 +--
 5 files changed, 170 insertions(+), 62 deletions(-)
Signature · 1 line
2.47.3