netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kazunori Miyazawa <kazunori@miyazawa.org>
To: "David S. Miller" <davem@davemloft.net>, herbert@gondor.apana.org.au
Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org
Subject: [PATCH][IPv6][IPsec] stop infinite loop
Date: Sat, 30 Apr 2005 11:25:25 +0900	[thread overview]
Message-ID: <4272EC95.20401@miyazawa.org> (raw)

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)

             reply	other threads:[~2005-04-30  2:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-30  2:25 Kazunori Miyazawa [this message]
2005-04-30  3:07 ` [PATCH][IPv6][IPsec] stop infinite loop 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4272EC95.20401@miyazawa.org \
    --to=kazunori@miyazawa.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@oss.sgi.com \
    --cc=usagi-core@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).