Просмотр исходного кода

ipv4: Fix time difference calculation in rt_bind_exception().

Reported-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 13 лет назад
Родитель
Сommit
7fed84f622
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      net/ipv4/route.c

+ 1 - 1
net/ipv4/route.c

@@ -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;