do not merge raw payload expressions with different length.
Other expression rely on key comparison which is assumed to have the
same length already.
Fixes: 60dcc01d6351 ("optimize: add __expr_cmp()")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
{
if (expr_a->etype != expr_b->etype)
return false;
+ if (expr_a->len != expr_b->len)
+ return false;
switch (expr_a->etype) {
case EXPR_PAYLOAD:
--- /dev/null
+#!/bin/bash
+
+set -e
+
+RULESET="table ip x {
+ chain y {
+ type filter hook prerouting priority raw; policy accept;
+ @th,160,32 0x02736c00 drop comment \"sl\"
+ @th,160,112 0x870697a7a6173656f03636f6d00 drop comment \"pizzaseo.com\"
+ }
+}"
+
+$NFT -o -f - <<< $RULESET