netfilter: nft_dynset: fix timeout updates on 32bit
authorFlorian Westphal <fw@strlen.de>
Fri, 27 Apr 2018 20:37:43 +0000 (22:37 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 6 May 2018 22:05:22 +0000 (00:05 +0200)
This must now use a 64bit jiffies value, else we set
a bogus timeout on 32bit.

Fixes: 8e1102d5a1596 ("netfilter: nf_tables: support timeouts larger than 23 days")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_dynset.c

index 5cc3509..b07a3fd 100644 (file)
@@ -81,7 +81,7 @@ static void nft_dynset_eval(const struct nft_expr *expr,
                if (priv->op == NFT_DYNSET_OP_UPDATE &&
                    nft_set_ext_exists(ext, NFT_SET_EXT_EXPIRATION)) {
                        timeout = priv->timeout ? : set->timeout;
-                       *nft_set_ext_expiration(ext) = jiffies + timeout;
+                       *nft_set_ext_expiration(ext) = get_jiffies_64() + timeout;
                }
 
                if (sexpr != NULL)