提交 d1b5b80d 编写于 作者: P Pablo Neira Ayuso

netfilter: nft_last: incorrect arithmetics when restoring last used

Subtract the jiffies that have passed by to current jiffies to fix last
used restoration.

Fixes: 836382dc ("netfilter: nf_tables: add last expression")
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 6ac4bac4
......@@ -37,7 +37,7 @@ static int nft_last_init(const struct nft_ctx *ctx, const struct nft_expr *expr,
if (err < 0)
return err;
priv->last_jiffies = jiffies + (unsigned long)last_jiffies;
priv->last_jiffies = jiffies - (unsigned long)last_jiffies;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册