]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/route.c
[IPV4]: Fix BUG of ip_rt_send_redirect()
[net-next-2.6.git] / net / ipv4 / route.c
index 1aaff0a2e09854604aca047e8f555170ae37427b..2daa0dc19d339e5dd3659ca63a9118279d4cc039 100644 (file)
@@ -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);