blob: bdff35b26e19bafb8ae1bed0694f0e46b1452cd8 [file] [log] [blame]
From 8e0819fab7895b31e0d521b097537e5965486da7 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@google.com>
Date: Tue, 5 Nov 2019 14:11:49 -0800
Subject: [PATCH] net: neigh: use long type to store jiffies delta
commit 9d027e3a83f39b819e908e4e09084277a2e45e95 upstream.
A difference of two unsigned long needs long storage.
Fixes: c7fb64db001f ("[NETLINK]: Neighbour table configuration and statistics via rtnetlink")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index a101892942c0..7ddcdc037329 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2047,8 +2047,8 @@ static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
goto nla_put_failure;
{
unsigned long now = jiffies;
- unsigned int flush_delta = now - tbl->last_flush;
- unsigned int rand_delta = now - tbl->last_rand;
+ long flush_delta = now - tbl->last_flush;
+ long rand_delta = now - tbl->last_rand;
struct neigh_hash_table *nht;
struct ndt_config ndc = {
.ndtc_key_len = tbl->key_len,
--
2.7.4