]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: relax type-checking for integer arguments in mark statements
authorJeremy Sowden <jeremy@azazel.net>
Mon, 4 Apr 2022 12:13:52 +0000 (13:13 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 7 Feb 2023 11:50:39 +0000 (12:50 +0100)
commiteab3eb7f146c07009ccd16ed41afd2769882fca0
treee363c6ab5e78525752baf1ded8c3c5f5394c4528
parentb3d4028a27edff0684a47356b13da494f7ec08ff
evaluate: relax type-checking for integer arguments in mark statements

In order to be able to set ct and meta marks to values derived from
payload expressions, we need to relax the requirement that the type of
the statement argument must match that of the statement key.  Instead,
we require that the base-type of the argument is integer and that the
argument is small enough to fit.

Add one testcase for tests/py.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
src/evaluate.c
tests/py/ip/meta.t
tests/py/ip/meta.t.json
tests/py/ip/meta.t.payload