netfilter: nftables: relax check for stateful expressions in set definition
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Feb 2021 12:20:47 +0000 (13:20 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Feb 2021 23:50:14 +0000 (00:50 +0100)
commit664899e85c1312e51d2761e7f8b2f25d053e8489
tree2f9749a0bb017e4ef4358bc18e6f2708bd616280
parent07998281c268592963e1cd623fe6ab0270b65ae4
netfilter: nftables: relax check for stateful expressions in set definition

Restore the original behaviour where users are allowed to add an element
with any stateful expression if the set definition specifies no stateful
expressions. Make sure upper maximum number of stateful expressions of
NFT_SET_EXPR_MAX is not reached.

Fixes: 8cfd9b0f8515 ("netfilter: nftables: generalize set expressions support")
Fixes: 48b0ae046ee9 ("netfilter: nftables: netlink support for several set element expressions")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c