diff mbox series

[nf-next] netfilter: nft_dynset: fix timeout updates on 32bit

Message ID 20180427203743.3612-1-fw@strlen.de
State Accepted
Delegated to: Pablo Neira
Headers show
Series [nf-next] netfilter: nft_dynset: fix timeout updates on 32bit | expand

Commit Message

Florian Westphal April 27, 2018, 8:37 p.m. UTC
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>
---
 line is 82 chars; checkpatch complains but i think line break is worse.

Comments

Pablo Neira Ayuso May 6, 2018, 10:05 p.m. UTC | #1
On Fri, Apr 27, 2018 at 10:37:43PM +0200, Florian Westphal wrote:
> This must now use a 64bit jiffies value, else we set
> a bogus timeout on 32bit.

Applied, thanks Florian.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/net/netfilter/nft_dynset.c b/net/netfilter/nft_dynset.c
index 5cc3509659c6..b07a3fd9eeea 100644
--- a/net/netfilter/nft_dynset.c
+++ b/net/netfilter/nft_dynset.c
@@ -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)