]> git.itanic.dy.fi Git - linux-stable/commit
netfilter: nft_limit: Clone packet limits' cost value
authorPhil Sutter <phil@nwl.cc>
Tue, 24 May 2022 12:50:01 +0000 (14:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 06:47:51 +0000 (08:47 +0200)
commit67429e678c8cdd1a02b776e2b60e2b49690a56d1
tree1990ea7c8d8987ed628b409b1e6f05b4baf6e0b8
parent7c58b14b6f9cde9f69e7fa053ab73f6e013a7131
netfilter: nft_limit: Clone packet limits' cost value

commit 558254b0b602b8605d7246a10cfeb584b1fcabfc upstream.

When cloning a packet-based limit expression, copy the cost value as
well. Otherwise the new limit is not functional anymore.

Fixes: 3b9e2ea6c11bf ("netfilter: nft_limit: move stateful fields out of expression data")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_limit.c