Commit 6619be03 authored by David Stevens's avatar David Stevens Committed by David S. Miller

[IPV4]: Use time_after() in override ARP calculation.

parent 398b3c44
...@@ -891,15 +891,14 @@ int arp_process(struct sk_buff *skb) ...@@ -891,15 +891,14 @@ int arp_process(struct sk_buff *skb)
if (n) { if (n) {
int state = NUD_REACHABLE; int state = NUD_REACHABLE;
int override = 0; int override;
/* If several different ARP replies follows back-to-back, /* If several different ARP replies follows back-to-back,
use the FIRST one. It is possible, if several proxy use the FIRST one. It is possible, if several proxy
agents are active. Taking the first reply prevents agents are active. Taking the first reply prevents
arp trashing and chooses the fastest router. arp trashing and chooses the fastest router.
*/ */
if (jiffies - n->updated >= n->parms->locktime) override = time_after(jiffies, n->updated + n->parms->locktime);
override = 1;
/* Broadcast replies and request packets /* Broadcast replies and request packets
do not assert neighbour reachability. do not assert neighbour reachability.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment