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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 1 Mar 2023 16:23:23 +0000 (17:23 +0100)
commit860e874290fb3be08e966c9c8ffc510c5b0f2bd8
treec20a082e5a7944bb51a1c81cc22421825413443e
parent2067e7a00aa604b94de31d64f29b8893b1696f26
netfilter: nft_last: copy content when cloning expression

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>
net/netfilter/nft_last.c