netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][IPv6][IPsec] stop infinite loop
@ 2005-04-30  2:25 Kazunori Miyazawa
  2005-04-30  3:07 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 13+ messages in thread
From: Kazunori Miyazawa @ 2005-04-30  2:25 UTC (permalink / raw)
  To: David S. Miller, herbert; +Cc: netdev, usagi-core

Hello,

IPv6 IPsec tunnel mode of linux-2.6.12-rc3 does not work
on my PCs. It seems to be infinitely looped.

I think dst_check causes it because it exptects the obsolete
of normal dst (I mean not xfrm) is 0 but ip6_route_add sets it -1.
This patch changes the default value of the obsolete.
This patch is for linux-2.6.12-rc3.

I will not be able to response quickly because I'm in holidays :-)

Signed-off-by Kazunori Miyazawa <kazunori@miyazawa.org>

diff -ruN a/net/ipv6/route.c b/net/ipv6/route.c
--- a/net/ipv6/route.c	2005-04-30 10:27:49.000000000 +0900
+++ b/net/ipv6/route.c	2005-04-30 10:34:04.000000000 +0900
@@ -113,7 +113,7 @@
 			.__refcnt	= ATOMIC_INIT(1),
 			.__use		= 1,
 			.dev		= &loopback_dev,
-			.obsolete	= -1,
+			.obsolete	= 0,
 			.error		= -ENETUNREACH,
 			.metrics	= { [RTAX_HOPLIMIT - 1] = 255, },
 			.input		= ip6_pkt_discard,
@@ -825,7 +825,7 @@
 		goto out;
 	}

-	rt->u.dst.obsolete = -1;
+	rt->u.dst.obsolete = 0;
 	rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info);
 	if (nlh && (r = NLMSG_DATA(nlh))) {
 		rt->rt6i_protocol = r->rtm_protocol;
@@ -1407,7 +1407,7 @@
 	rt->u.dst.metrics[RTAX_MTU-1] = ipv6_get_mtu(rt->rt6i_dev);
 	rt->u.dst.metrics[RTAX_ADVMSS-1] = ipv6_advmss(dst_mtu(&rt->u.dst));
 	rt->u.dst.metrics[RTAX_HOPLIMIT-1] = -1;
-	rt->u.dst.obsolete = -1;
+	rt->u.dst.obsolete = 0;

 	rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP;
 	if (!anycast)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-05-04  5:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-30  2:25 [PATCH][IPv6][IPsec] stop infinite loop Kazunori Miyazawa
2005-04-30  3:07 ` YOSHIFUJI Hideaki / 吉藤英明
2005-04-30  3:11   ` Herbert Xu
2005-04-30  8:23     ` [IPSEC] Store idev entries (was: [PATCH][IPv6][IPsec] stop infinite loop) Herbert Xu
2005-04-30 11:43       ` Herbert Xu
2005-05-03 23:26         ` David S. Miller
2005-05-04  0:46           ` Herbert Xu
2005-05-04  1:06           ` [IPSEC] Store idev entries Patrick McHardy
2005-05-04  1:12             ` Herbert Xu
2005-05-04  1:19               ` Herbert Xu
2005-05-04  1:23                 ` Patrick McHardy
2005-05-04  1:20               ` Patrick McHardy
2005-05-04  5:16                 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).