netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Pekka Savola <pekkas@netcore.fi>
Cc: netdev@vger.kernel.org
Subject: Re: 2.6.20.3-rc1 / iproute2 hoplimit 2^32-1 vs 2^8-1
Date: Mon, 19 Mar 2007 16:20:30 +0100	[thread overview]
Message-ID: <45FEAA3E.20601@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0703191706530.3331@netcore.fi>

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]

Pekka Savola wrote:
> On kernel based on 2.6.20.3-rc1 (FC6), 'ip -6 r l' shows:
> 
> default via fe80::212:f0ff:fe5f:c4ec dev eth1  proto kernel  metric
> 1024  expires 7191sec mtu 1500 advmss 1440 hoplimit 4294967295
> 
> (this is the same with iproute2-ss061214 and iproute2-ss070313.)
> 
> So, it seems that the data length for hoplimit is not quite right, or
> it's reported as 2^32-1 instead of 2^8-1...


Does this fix it?

Signed-off-by: Patrick McHardy <kaber@trash.net>

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 816 bytes --]

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 0e1f4b2..ec347e5 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1216,7 +1216,7 @@ install_route:
 	}
 
 	if (rt->u.dst.metrics[RTAX_HOPLIMIT-1] == 0)
-		rt->u.dst.metrics[RTAX_HOPLIMIT-1] = -1;
+		rt->u.dst.metrics[RTAX_HOPLIMIT-1] = 255;
 	if (!rt->u.dst.metrics[RTAX_MTU-1])
 		rt->u.dst.metrics[RTAX_MTU-1] = ipv6_get_mtu(dev);
 	if (!rt->u.dst.metrics[RTAX_ADVMSS-1])
@@ -1821,7 +1821,7 @@ struct rt6_info *addrconf_dst_alloc(stru
 	rt->rt6i_idev = idev;
 	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.metrics[RTAX_HOPLIMIT-1] = 255;
 	rt->u.dst.obsolete = -1;
 
 	rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP;

  reply	other threads:[~2007-03-19 15:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19 15:11 2.6.20.3-rc1 / iproute2 hoplimit 2^32-1 vs 2^8-1 Pekka Savola
2007-03-19 15:20 ` Patrick McHardy [this message]
2007-03-19 15:27   ` Patrick McHardy
2007-03-19 19:18     ` David Miller
2007-03-20  8:27       ` Pekka Savola
2007-03-20  8:39         ` YOSHIFUJI Hideaki / 吉藤英明

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=45FEAA3E.20601@trash.net \
    --to=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=pekkas@netcore.fi \
    /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).