mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 17:23:25 -05:00
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: 836382dc24
("netfilter: nf_tables: add last expression")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
6ac4bac4ce
commit
d1b5b80da7
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue