]> git.hungrycats.org Git - linux/commitdiff
[IPV4]: Use time_after() in override ARP calculation.
authorDavid Stevens <dlstevens@us.ibm.com>
Sat, 8 May 2004 08:17:31 +0000 (01:17 -0700)
committerDavid S. Miller <davem@nuts.davemloft.net>
Sat, 8 May 2004 08:17:31 +0000 (01:17 -0700)
net/ipv4/arp.c

index ec25d9b9da2cffad95b3f6e5bb4a139bbf50917e..bc76f3fb79ec057931e07c9e464cbcb5c7420a35 100644 (file)
@@ -891,15 +891,14 @@ int arp_process(struct sk_buff *skb)
 
        if (n) {
                int state = NUD_REACHABLE;
-               int override = 0;
+               int override;
 
                /* If several different ARP replies follows back-to-back,
                   use the FIRST one. It is possible, if several proxy
                   agents are active. Taking the first reply prevents
                   arp trashing and chooses the fastest router.
                 */
-               if (jiffies - n->updated >= n->parms->locktime)
-                       override = 1;
+               override = time_after(jiffies, n->updated + n->parms->locktime);
 
                /* Broadcast replies and request packets
                   do not assert neighbour reachability.