Hi Steven
There is a bug about icmp netunreach.
If the kernel does not find a route for a packet, it must send a
icmp netunreach packet
to the source host, and discard the packet.
But the latest kernel does not send a icmp netunreach packet
because of the fib_lookup
return
of -ESRCH when a route is not found.
Signed-off-by: Li Yewang [EMAIL PROTECTED]
diff -Nurp net/core_back/fib_rules.c net/core/fib_rules.c
--- net/core_back/fib_rules.c 2008-02-25 13:15:37.0 +0800
+++ net/core/fib_rules.c2008-02-25 13:16:01.0 +0800
@@ -188,7 +188,7
YOSHIFUJI Hideaki / 吉藤英明 says:
It is not mandatory, however, it is better to do this. I agree.
(Note: In usual, we do not install gateway'ed route with global
next-hop.)
Yes, but if somebody set the route with global next-hop, or some
other reasons, the next-hop with global address. The
-by: Li Yewang [EMAIL PROTECTED]
--- a/net/ipv6/ndisc.c 2007-01-13 16:59:50.050650888 +0800
+++ b/net/ipv6/ndisc.c 2007-01-13 17:02:02.362536424 +0800
@@ -1412,6 +1412,13 @@ void ndisc_send_redirect(struct sk_buff
return;
}
+ if (!ipv6_addr_equal(skb-nh.ipv6h-daddr
patch:
signed-off-by: Li Yewang[EMAIL PROTECTED]
--- linux-2.6.19.1/net/ipv4/route.c 2006-12-12 03:32:54.0
+0800
+++ linux-2.6.19.1/net/ipv4/route.org.c 2006-11-29 16:14:34.592058480
+0800
@@ -1327,7 +1327,8 @@ void ip_rt_send_redirect(struct sk_buff
/* Check for load limit; set
entry will be created in the route cache again, and the
rate_last will be initialized to 0. So we don't care of the jiffies
wraparound too.
Following is my patch:
Signed-off-by: Li Yewang [EMAIL PROTECTED]
--- linux-2.6.19/net/ipv4/route.c.org 2006-12-05 10:47:02.402147160
+0800
+++ linux-2.6.19
Herbert Xu [EMAIL PROTECTED] wrote:
I think there are two problems here:
1) The first time we hit the check rate_last is zero. We should simply
proceed with the redirect rather than treating this as a jiffies value.
2) When a dst is so old that the jiffies have wrapped around. I'm
not sure
--|--|--|time
0x8000+bb0x7fff+b
|--jiffies - b 0x7fff--|
Following is my patch.
Signed-off-by: Li Yewang [EMAIL PROTECTED]
--- linux-2.6.9/net/ipv4/route.c.org2006-11-16 08:49:48.0 +0800
+++ linux-2.6.9/net/ipv4/route.c