]> git.ipfire.org Git - thirdparty/nftables.git/commit
optimize: add unsupported statement
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 17 Jun 2022 15:49:59 +0000 (17:49 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 23 Jun 2022 17:00:02 +0000 (19:00 +0200)
commit887405df6b654cbd7a480d36db10eb98f9bb19fa
treea548e754c644d4b9a11ceb91fd14273dc56ecc9c
parent8f61a69e035d04834937fc28a42cf1841d825054
optimize: add unsupported statement

Do not try to merge rules with unsupported statements. This patch adds a
dummy unsupported statement which is included in the statement
collection and the rule vs statement matrix.

When looking for possible rule mergers, rules using unsupported
statements are discarded, otherwise bogus rule mergers might occur.

Note that __stmt_type_eq() already returns false for unsupported
statements.

Add a test using meta mark statement, which is not yet supported.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/optimize.c
tests/shell/testcases/optimizations/dumps/skip_unsupported.nft [new file with mode: 0644]
tests/shell/testcases/optimizations/skip_unsupported [new file with mode: 0755]