The following configuration:
table inet filter {
chain input {
ct original ip daddr {1.2.3.4} accept
}
}
is triggering an infinite loop.
This problem also exists with concatenations and ct ip {s,d}addr. Until
we have a solution for this, let's just prevent infinite loops.
Now we hit this:
# nft list ruleset
nft: netlink_delinearize.c:124: netlink_parse_concat_expr: Assertion `consumed > 0' failed.
Abort
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
unsigned int len)
{
struct expr *concat, *expr;
+ unsigned int consumed;
concat = concat_expr_alloc(loc);
while (len > 0) {
}
compound_expr_add(concat, expr);
- len -= netlink_padded_len(expr->len);
+ consumed = netlink_padded_len(expr->len);
+ assert(consumed > 0);
+ len -= consumed;
reg += netlink_register_space(expr->len);
}
return concat;