]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: maps: check element data mapping matches set data definition
authorFlorian Westphal <fw@strlen.de>
Mon, 21 Jul 2025 10:57:07 +0000 (12:57 +0200)
committerFlorian Westphal <fw@strlen.de>
Tue, 22 Jul 2025 12:38:31 +0000 (14:38 +0200)
commitbc1eeb8fe709b2c0322a6b0e447517256cc9c18b
treeb4c6e5431995a5456a5bce89b6b58f3f743365a1
parent715010c61ba25627b57d95d096138013e7c0e194
evaluate: maps: check element data mapping matches set data definition

This change is similar to
7f4d7fef31bd ("evaluate: check element key vs. set definition")

but this time for data mappings.

The included bogon asserts with:
BUG: invalid data expression type catch-all set element
nft: src/netlink.c:596: __netlink_gen_data: Assertion `0' failed.

after:
internal:0:0-0: Error: Element mapping mismatches map definition, expected packet mark, not 'invalid'

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/catchall_as_data_element_assert [new file with mode: 0644]