From: Li Yewang Date: Mon, 18 Dec 2006 08:26:35 +0000 (-0800) Subject: [IPV4]: Fix BUG of ip_rt_send_redirect() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=14fb8a764786e37ac26a2175638115f21980e5a3;p=linux-beck.git [IPV4]: Fix BUG of ip_rt_send_redirect() Fix the redirect packet of the router if the jiffies wraparound. Signed-off-by: Li Yewang Signed-off-by: David S. Miller --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 1aaff0a2e098..2daa0dc19d33 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1325,7 +1325,8 @@ void ip_rt_send_redirect(struct sk_buff *skb) /* Check for load limit; set rate_last to the latest sent * redirect. */ - if (time_after(jiffies, + if (rt->u.dst.rate_tokens == 0 || + time_after(jiffies, (rt->u.dst.rate_last + (ip_rt_redirect_load << rt->u.dst.rate_tokens)))) { icmp_send(skb, ICMP_REDIRECT, ICMP_REDIR_HOST, rt->rt_gateway);