From: David Miller <davem@davemloft.net>
To: netdev@vger.kernel.org
Subject: ipv6: Demark default hoplimit as zero.
Date: Mon, 13 Dec 2010 10:03:25 -0800 (PST) [thread overview]
Message-ID: <20101213.100325.183062004.davem@davemloft.net> (raw)
This is for consistency with ipv4. Using "-1" makes
no sense.
It was made this way a long time ago merely to be consistent
with how the ipv6 socket hoplimit "default" is stored.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv6/route.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index d9405d1..98796b0 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1105,7 +1105,7 @@ static int ipv6_get_mtu(struct net_device *dev)
int ip6_dst_hoplimit(struct dst_entry *dst)
{
int hoplimit = dst_metric_raw(dst, RTAX_HOPLIMIT);
- if (hoplimit < 0) {
+ if (hoplimit == 0) {
struct net_device *dev = dst->dev;
struct inet6_dev *idev;
@@ -1310,8 +1310,6 @@ install_route:
}
}
- if (dst_metric_raw(&rt->dst, RTAX_HOPLIMIT) == 0)
- dst_metric_set(&rt->dst, RTAX_HOPLIMIT, -1);
if (!dst_mtu(&rt->dst))
dst_metric_set(&rt->dst, RTAX_MTU, ipv6_get_mtu(dev));
if (!dst_metric(&rt->dst, RTAX_ADVMSS))
--
1.7.3.2
reply other threads:[~2010-12-13 18:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20101213.100325.183062004.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.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).