netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft 0/2] --optimize fixes
@ 2022-08-09 21:18 Pablo Neira Ayuso
  2022-08-09 21:18 ` [PATCH nft 1/2] optimize: merging concatenation is unsupported Pablo Neira Ayuso
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2022-08-09 21:18 UTC (permalink / raw)
  To: netfilter-devel

Hi,

Two more fixes for the -o/--optimize infrastructure, reported by users
after the release:

1) do not hit assert() when concatenation already exists in the ruleset.
2) do not merge rules unless they contain at least one mergeable statement.

Both patches come with tests to illustrate the issues.

Pablo Neira Ayuso (2):
  optimize: merging concatenation is unsupported
  optimize: check for mergeable rules

 src/optimize.c                                | 32 ++++++++++++++++++-
 .../dumps/merge_stmts_concat.nft              |  1 +
 .../optimizations/dumps/not_mergeable.nft     | 12 +++++++
 .../optimizations/merge_stmts_concat          |  1 +
 .../testcases/optimizations/not_mergeable     | 16 ++++++++++
 5 files changed, 61 insertions(+), 1 deletion(-)
 create mode 100644 tests/shell/testcases/optimizations/dumps/not_mergeable.nft
 create mode 100755 tests/shell/testcases/optimizations/not_mergeable

-- 
2.30.2


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

end of thread, other threads:[~2022-08-11 14:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-09 21:18 [PATCH nft 0/2] --optimize fixes Pablo Neira Ayuso
2022-08-09 21:18 ` [PATCH nft 1/2] optimize: merging concatenation is unsupported Pablo Neira Ayuso
2022-08-09 21:18 ` [PATCH nft 2/2] optimize: check for mergeable rules Pablo Neira Ayuso
2022-08-11 14:34 ` [PATCH nft 0/2] --optimize fixes Pablo Neira Ayuso

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).