Before this patch, comparison between rules with distinct number of
expressions indicate that they are equals, however, they are not.
Example:
r1[e1, e2] == r2[e1, e2, e3]
Fix this by checking that the number of expression is the same.
Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Carlos Falgueras García <carlosfg@riseup.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
e1 = nftnl_expr_iter_next(&it1);
e2 = nftnl_expr_iter_next(&it2);
}
+ eq &= (!e1 && !e2);
return eq;
}