]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
netfilter: nft_last: copy content when cloning expression
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 28 Feb 2023 16:09:03 +0000 (17:09 +0100)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:33:07 +0000 (13:33 +0200)
commit2c229a5af5f96353bd2c343f87306257b077903d
tree639454a1be11a734530151ca5b51c71fc76ce5e3
parent4ccfbe324dad5f537c6de88b3fd95519b1e9dc80
netfilter: nft_last: copy content when cloning expression

BugLink: https://bugs.launchpad.net/bugs/2016875
[ Upstream commit 860e874290fb3be08e966c9c8ffc510c5b0f2bd8 ]

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

Fixes: 33a24de37e81 ("netfilter: nft_last: move stateful fields out of expression data")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/netfilter/nft_last.c