]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: support timeouts larger than 23 days
authorFlorian Westphal <fw@strlen.de>
Mon, 16 Apr 2018 16:04:49 +0000 (18:04 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 24 Apr 2018 08:29:20 +0000 (10:29 +0200)
commit39c838ffcf9a3d92289c69e91c32a938fcb29e12
treeab0336255bb7b058e9c9babb8c80ea1942b2bb3b
parent8a7db46a7a0566a742c9d06dd6223219dbef8f6b
netfilter: nf_tables: support timeouts larger than 23 days

Marco De Benedetto says:
 I would like to use a timeout of 30 days for elements in a set but it
 seems there is a some kind of problem above 24d20h31m23s.

Fix this by using 'jiffies64' for timeout handling to get same behaviour
on 32 and 64bit systems.

nftables passes timeouts as u64 in milliseconds to the kernel,
but on kernel side we used a mixture of 'long' and jiffies conversions
rather than u64 and jiffies64.

Bugzilla: https://bugzilla.netfilter.org/show_bug.cgi?id=1237
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c