diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-12-07 17:37:01 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-12-12 11:44:42 +0100 |
commit | 8cfd9b0f8515e7c361bba27e2a2684cbd427fe01 (patch) | |
tree | 4448d9e59edd49418fc55452bffab69282a8eb47 /net/netfilter/nft_dynset.c | |
parent | 86d21fc7474563cb5d054ff001d8ad7b69206717 (diff) | |
download | linux-8cfd9b0f8515e7c361bba27e2a2684cbd427fe01.tar.gz linux-8cfd9b0f8515e7c361bba27e2a2684cbd427fe01.tar.bz2 linux-8cfd9b0f8515e7c361bba27e2a2684cbd427fe01.zip |
netfilter: nftables: generalize set expressions support
Currently, the set infrastucture allows for one single expressions per
element. This patch extends the existing infrastructure to allow for up
to two expressions. This is not updating the netlink API yet, this is
coming as an initial preparation patch.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_dynset.c')
-rw-r--r-- | net/netfilter/nft_dynset.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nft_dynset.c b/net/netfilter/nft_dynset.c index 64ca13a1885b..4353e47c30fc 100644 --- a/net/netfilter/nft_dynset.c +++ b/net/netfilter/nft_dynset.c @@ -188,7 +188,8 @@ static int nft_dynset_init(const struct nft_ctx *ctx, if (IS_ERR(priv->expr)) return PTR_ERR(priv->expr); - if (set->expr && set->expr->ops != priv->expr->ops) { + if (set->num_exprs == 1 && + set->exprs[0]->ops != priv->expr->ops) { err = -EOPNOTSUPP; goto err_expr_free; } |