]> exis.tech > repos - linux.git/commit
netfilter: xt_rateest: fix u64 truncation in xt_rateest_mt()
authorFeng Wu <wufengwufengwufeng@gmail.com>
Thu, 25 Jun 2026 08:44:25 +0000 (08:44 +0000)
committerFlorian Westphal <fw@strlen.de>
Fri, 3 Jul 2026 12:45:21 +0000 (14:45 +0200)
commit444853cd438201007da5359821adcc2995655ab1
treeef020a15388730058bc72f8e0dc183acbc8e2812
parent64cdf7d30ac18e43df6c48004435febb965809a8
netfilter: xt_rateest: fix u64 truncation in xt_rateest_mt()

On links faster than ~34 Gbps, where byte rate may exceed 2^32-1
(~ 4.3 GBps), the comparison result becomes incorrect because the
truncated value no longer reflects the actual estimator rate.

Fix by changing the local variables to u64.

Fixes: 1c0d32fde5bd ("net_sched: gen_estimator: complete rewrite of rate estimators")
Signed-off-by: Feng Wu <wufengwufengwufeng@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/xt_rateest.c