diff options
author | David S. Miller <davem@davemloft.net> | 2010-12-12 21:39:02 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-12 21:39:02 -0800 |
commit | a02e4b7dae455151c423e2f69ef222c502a321fd (patch) | |
tree | 33ceeb14e559a17160f7fae42935283872725e5d /net/ipv6 | |
parent | 5170ae824ddf1988a63fb12cbedcff817634c444 (diff) | |
download | linux-3.10-a02e4b7dae455151c423e2f69ef222c502a321fd.tar.gz linux-3.10-a02e4b7dae455151c423e2f69ef222c502a321fd.tar.bz2 linux-3.10-a02e4b7dae455151c423e2f69ef222c502a321fd.zip |
ipv6: Demark default hoplimit as zero.
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>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | 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 d9405d1863b..98796b0dc2b 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)) |