Subject: Re:[PATCH]Fix BUG of ip_rt_send_redirect()

From: Li Yewang <[email-masked]>
Date: Tue, 19 Dec 2006 09:45:25 +0800

David Miller <[email-masked]> wrote:

> Applied, but I had to fix many errors in your patch by hand.
> Please take care of these details next time.
> 
> Here, your email client wrapped the lines in the patch, corrupting it.
> 
> Please use real tab characters, when necessary, in the indentation of
> new code lines that you add, not just spaces.
> 
> Thank you.

Mr David Miller

I have made another patch file about the ip_rt_send_redirect().
This patch has not wrapped lines, and can be patched into the kernel.

Following is my patch:

signed-off-by: Li Yewang <[email-masked]>

--- a/net/ipv4/route.org.c	2006-12-19 09:22:16.260271000 +0800
+++ a/net/ipv4/route.c	2006-12-19 09:22:16.241273888 +0800
@@ -1327,7 +1327,8 @@ void ip_rt_send_redirect(struct sk_buff 
 	/* 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);