]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_quota: copy content when cloning expression
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 28 Feb 2023 19:43:02 +0000 (20:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:50:23 +0000 (08:50 +0100)
commitea9e211a7a1cae3fe6e19d66f5877ffd7bbb3623
tree64a78bd2721030e3a4ed5659d52b778b0dda0fdc
parent8204e0c7f3c2eb6bf363d1ab98a385e6a7fef31b
netfilter: nft_quota: copy content when cloning expression

[ Upstream commit 56b8c484d417dd30a635cf6fa46d3063a68dbe0a ]

If the ruleset contains consumed quota, restore them accordingly.
Otherwise, listing after restoration shows never used items.

Restore the user-defined quota and flags too.

Fixes: 5da0d94e8605 ("netfilter: nft_quota: move stateful fields out of expression data")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_quota.c