]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 11:01:57 +0000 (12:01 +0100)
commit825e50affb5d31bceeacbb41ed46e43145f7235e
tree9e85eca34a1352ec30e5010d4e302022df4fa43f
parent4c72d73f12a47ddb3f6e3bc97b08af180ffb0029
netfilter: nf_tables: add function to create set stateful expressions

[ Upstream commit a8fe4154fa5a1bae590b243ed60f871e5a5e1378 ]

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>
Stable-dep-of: f6594c372afd ("netfilter: nf_tables: perform type checking for existing sets")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c