mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-18 07:09:36 +02:00
netfilter: nf_tables: elements with timeout below CONFIG_HZ never expire
[ Upstream commite0c4728172
] Element timeout that is below CONFIG_HZ never expires because the timeout extension is not allocated given that nf_msecs_to_jiffies64() returns 0. Set timeout to the minimum value to honor timeout. Fixes:8e1102d5a1
("netfilter: nf_tables: support timeouts larger than 23 days") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8ad28208be
commit
08b25d59ff
|
@ -4462,7 +4462,7 @@ int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result)
|
||||||
return -ERANGE;
|
return -ERANGE;
|
||||||
|
|
||||||
ms *= NSEC_PER_MSEC;
|
ms *= NSEC_PER_MSEC;
|
||||||
*result = nsecs_to_jiffies64(ms);
|
*result = nsecs_to_jiffies64(ms) ? : !!ms;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user