]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: fix crash when generating reject statement error
authorFlorian Westphal <fw@strlen.de>
Mon, 31 Mar 2025 12:43:34 +0000 (14:43 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 2 Apr 2025 05:11:40 +0000 (07:11 +0200)
commit9b7346d1eac2eb90a2baf589affafec5b1a033b6
tree5d001e4bf144b82136dea9838477ed337285a29d
parentd4bcce5abb05e34de594d24313379391fb9f2c6a
evaluate: fix crash when generating reject statement error

After patch, this gets rejected with:
internal:0:0-0: Error: conflicting protocols specified: ip vs ip6

Without patch, we crash with a NULL dereference: we cannot use
reject.expr->location unconditionally.

Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c
tests/shell/testcases/bogons/nft-j-f/reject_stmt_with_no_expression_crash [new file with mode: 0644]