]> git.ipfire.org Git - thirdparty/nftables.git/commit
payload: only assert if l2 header base has no length
authorFlorian Westphal <fw@strlen.de>
Thu, 11 Jan 2024 12:11:22 +0000 (13:11 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 22 Jan 2025 23:41:54 +0000 (00:41 +0100)
commit591711049304d0e8c2a8029e11944f610e83ac26
tree7e1550449a27abd48c9dce071b4dd21823ecfd03
parentb5b2f490fb528145df496cb07122e1ffb3b5b983
payload: only assert if l2 header base has no length

commit 9cc41467c75ab6beb35e0d7c34d04acd1a44861b upstream.

nftables will assert in some cases because the sanity check is done even
for network and transport header bases.

However, stacked headers are only supported for the link layer.
Move the assertion around and add a test case for this.

Signed-off-by: Florian Westphal <fw@strlen.de>
src/payload.c
tests/shell/testcases/bogons/nft-f/payload_expr_pctx_update_assert [new file with mode: 0644]