]> 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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 13 Aug 2025 18:52:47 +0000 (20:52 +0200)
commitbce146622186cd6fc91429541dce5a880008924b
tree7b67a6450cfd6aba4033d61d4a9472a8709af1db
parent362ec106c7bd42bda776cc9349c0868145b101c2
evaluate: maps: check element data mapping matches set data definition

commit bc1eeb8fe709b2c0322a6b0e447517256cc9c18b upstream.

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]