diff options
author | David S. Miller <davem@davemloft.net> | 2010-12-13 00:39:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-13 00:39:02 -0500 |
commit | a02e4b7dae455151c423e2f69ef222c502a321fd (patch) | |
tree | 33ceeb14e559a17160f7fae42935283872725e5d /net/ipv6/route.c | |
parent | 5170ae824ddf1988a63fb12cbedcff817634c444 (diff) |
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/route.c')
-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 d9405d1863b8..98796b0dc2b7 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1105,7 +1105,7 @@ static int ipv6_get_mtu(struct net_device *dev) | |||
1105 | int ip6_dst_hoplimit(struct dst_entry *dst) | 1105 | int ip6_dst_hoplimit(struct dst_entry *dst) |
1106 | { | 1106 | { |
1107 | int hoplimit = dst_metric_raw(dst, RTAX_HOPLIMIT); | 1107 | int hoplimit = dst_metric_raw(dst, RTAX_HOPLIMIT); |
1108 | if (hoplimit < 0) { | 1108 | if (hoplimit == 0) { |
1109 | struct net_device *dev = dst->dev; | 1109 | struct net_device *dev = dst->dev; |
1110 | struct inet6_dev *idev; | 1110 | struct inet6_dev *idev; |
1111 | 1111 | ||
@@ -1310,8 +1310,6 @@ install_route: | |||
1310 | } | 1310 | } |
1311 | } | 1311 | } |
1312 | 1312 | ||
1313 | if (dst_metric_raw(&rt->dst, RTAX_HOPLIMIT) == 0) | ||
1314 | dst_metric_set(&rt->dst, RTAX_HOPLIMIT, -1); | ||
1315 | if (!dst_mtu(&rt->dst)) | 1313 | if (!dst_mtu(&rt->dst)) |
1316 | dst_metric_set(&rt->dst, RTAX_MTU, ipv6_get_mtu(dev)); | 1314 | dst_metric_set(&rt->dst, RTAX_MTU, ipv6_get_mtu(dev)); |
1317 | if (!dst_metric(&rt->dst, RTAX_ADVMSS)) | 1315 | if (!dst_metric(&rt->dst, RTAX_ADVMSS)) |