netfilter: nf_tables: add function to create set stateful expressions
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 19 Dec 2022 17:00:10 +0000 (18:00 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 21 Dec 2022 16:34:00 +0000 (17:34 +0100)
commita8fe4154fa5a1bae590b243ed60f871e5a5e1378
treee886dd5079a067b5eca2f3764fb1ca425b0a0bc0
parentbed4a63ea4ae77cfe5aae004ef87379f0655260a
netfilter: nf_tables: add function to create set stateful expressions

Add a helper function to allocate and initialize the stateful expressions
that are defined in a set.

This patch allows to reuse this code from the set update path, to check
that type of the update matches the existing set in the kernel.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c