aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/arp.c')
-rw-r--r--net/ipv4/arp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 850a6f13a082..f2d56f9e8303 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -899,7 +899,14 @@ static int arp_process(struct net *net, struct sock *sk, struct sk_buff *skb)
agents are active. Taking the first reply prevents
arp trashing and chooses the fastest router.
*/
- override = time_after(jiffies,
+ /*
+ * If n->updated is after jiffies, then the clock has wrapped and
+ * we are *well* past the locktime, so set the override flag
+ */
+ if (time_after(n->updated, jiffies))
+ override = 1;
+ else
+ override = time_after(jiffies,
n->updated +
NEIGH_VAR(n->parms, LOCKTIME)) ||
is_garp;