]> 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)
commitccfdaa45a8896d4f8812a99fae3a9f2a04cf3b9c
treeab0336255bb7b058e9c9babb8c80ea1942b2bb3b
parentccf8c97d2b77230605ea52eeed0f2b72fbc24fb0
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