From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nft 0/3] evaluate: fix crash on empty set restore
Date: Wed, 3 Feb 2021 19:41:50 +0100 [thread overview]
Message-ID: <20210203184150.32145-1-fw@strlen.de> (raw)
nft crashes when it restores an empty set.
First patch moves two dump files to the correct location.
Those test cases now fail when the dump files are modified,
as expected.
Second patch adds crash reproducer test case.
Third patch avoids iteration when no statements exist in the set.
Florian Westphal (3):
testcases: move two dump files to correct location
tests: add empty dynamic set
evaluate: do not crash if dynamic set has no statements
src/evaluate.c | 10 ++++++----
.../dumps/0031priority_variable_0.nft} | 0
.../dumps/0035policy_variable_0.nft} | 0
tests/shell/testcases/nft-f/0025empty_dynset_0 | 16 ++++++++++++++++
.../testcases/nft-f/dumps/0025empty_dynset_0.nft | 12 ++++++++++++
5 files changed, 34 insertions(+), 4 deletions(-)
rename tests/shell/testcases/{nft-f/dumps/0021priority_variable_0.nft => chains/dumps/0031priority_variable_0.nft} (100%)
rename tests/shell/testcases/{nft-f/dumps/0025policy_variable_0.nft => chains/dumps/0035policy_variable_0.nft} (100%)
create mode 100755 tests/shell/testcases/nft-f/0025empty_dynset_0
create mode 100644 tests/shell/testcases/nft-f/dumps/0025empty_dynset_0.nft
--
2.26.2
next reply other threads:[~2021-02-03 18:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 18:41 Florian Westphal [this message]
2021-02-03 18:42 ` [PATCH nft 1/3] testcases: move two dump files to correct location Florian Westphal
2021-02-03 18:42 ` [PATCH nft 2/3] tests: add empty dynamic set Florian Westphal
2021-02-03 18:42 ` [PATCH nft 3/3] evaluate: do not crash if dynamic set has no statements Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210203184150.32145-1-fw@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).