ipv4: Fix time difference calculation in rt_bind_exception().
authorDavid S. Miller <davem@davemloft.net>
Thu, 19 Jul 2012 15:46:59 +0000 (08:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Jul 2012 15:46:59 +0000 (08:46 -0700)
Reported-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c

index f67e70236728cac0b560f971a7eb279e63551f3e..2c25581bf25c1342b719ae8cca36f41609a3f029 100644 (file)
@@ -1907,7 +1907,7 @@ static void rt_bind_exception(struct rtable *rt, struct fib_nh *nh, __be32 daddr
                if (fnhe->fnhe_daddr == daddr) {
                        if (fnhe->fnhe_pmtu) {
                                unsigned long expires = fnhe->fnhe_expires;
-                               unsigned long diff = jiffies - expires;
+                               unsigned long diff = expires - jiffies;
 
                                if (time_before(jiffies, expires)) {
                                        rt->rt_pmtu = fnhe->fnhe_pmtu;