Skip to content

Commit

Permalink
ipv4: Fix time difference calculation in rt_bind_exception().
Browse files Browse the repository at this point in the history
Reported-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 19, 2012
1 parent 1eb8c69 commit 7fed84f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7fed84f

Please sign in to comment.