]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_dynset: fix element timeout for HZ != 1000
authorAnders K. Pedersen <akp@cohaesio.com>
Sun, 9 Oct 2016 13:49:02 +0000 (13:49 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Oct 2016 15:29:39 +0000 (17:29 +0200)
commitfa9236c37e844bec0b4d9febb4e11b3d4f1df205
tree9bcd909b21922c25606a71c414759717f38845a2
parentfe1d69ce227e7cf27ffe23646c8d19eee979e9f1
netfilter: nft_dynset: fix element timeout for HZ != 1000

With HZ=100 element timeout in dynamic sets (i.e. flow tables) is 10 times
higher than configured.

Add proper conversion to/from jiffies, when interacting with userspace.

I tested this on Linux 4.8.1, and it applies cleanly to current nf and
nf-next trees.

Fixes: e907265f4d6d ("netfilter: nf_tables: add support for dynamic set updates")
Signed-off-by: Anders K. Pedersen <akp@cohaesio.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_dynset.c