From 77bd7e0c70d9a1914c4a853e09849af724c0f695 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 5 Oct 2022 01:36:44 +0200 Subject: evaluate: bogus datatype assertion in binary operation evaluation Use datatype_equal(), otherwise dynamically allocated datatype fails to fulfill the datatype pointer check, triggering the assertion: nft: evaluate.c:1249: expr_evaluate_binop: Assertion `expr_basetype(left) == expr_basetype(right)' failed. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1636 Signed-off-by: Pablo Neira Ayuso --- tests/shell/testcases/optimizations/dumps/not_mergeable.nft | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/shell/testcases/optimizations/dumps') diff --git a/tests/shell/testcases/optimizations/dumps/not_mergeable.nft b/tests/shell/testcases/optimizations/dumps/not_mergeable.nft index 08b2b58f..02b89207 100644 --- a/tests/shell/testcases/optimizations/dumps/not_mergeable.nft +++ b/tests/shell/testcases/optimizations/dumps/not_mergeable.nft @@ -5,8 +5,15 @@ table ip x { chain t2 { } + chain t3 { + } + + chain t4 { + } + chain y { counter packets 0 bytes 0 jump t1 counter packets 0 bytes 0 jump t2 + ip version vmap { 4 : jump t3, 6 : jump t4 } } } -- cgit v1.2.3