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 <pablo@netfilter.org>
sym, expr_name(right));
/* The grammar guarantees this */
- assert(expr_basetype(left) == expr_basetype(right));
+ assert(datatype_equal(expr_basetype(left), expr_basetype(right)));
switch (op->op) {
case OP_LSHIFT:
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 }
}
}
}
chain t2 {
}
+ chain t3 {
+ }
+ chain t4 {
+ }
chain y {
counter jump t1
counter jump t2
+ ip version 4 jump t3
+ ip version 6 jump t4
}
}"