Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a02e4b7d authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarDavid S. Miller <davem@davemloft.net>
parent 5170ae82
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -1105,7 +1105,7 @@ static int ipv6_get_mtu(struct net_device *dev)
int ip6_dst_hoplimit(struct dst_entry *dst)
int ip6_dst_hoplimit(struct dst_entry *dst)
{
{
	int hoplimit = dst_metric_raw(dst, RTAX_HOPLIMIT);
	int hoplimit = dst_metric_raw(dst, RTAX_HOPLIMIT);
	if (hoplimit < 0) {
	if (hoplimit == 0) {
		struct net_device *dev = dst->dev;
		struct net_device *dev = dst->dev;
		struct inet6_dev *idev;
		struct inet6_dev *idev;


@@ -1310,8 +1310,6 @@ int ip6_route_add(struct fib6_config *cfg)
		}
		}
	}
	}


	if (dst_metric_raw(&rt->dst, RTAX_HOPLIMIT) == 0)
		dst_metric_set(&rt->dst, RTAX_HOPLIMIT, -1);
	if (!dst_mtu(&rt->dst))
	if (!dst_mtu(&rt->dst))
		dst_metric_set(&rt->dst, RTAX_MTU, ipv6_get_mtu(dev));
		dst_metric_set(&rt->dst, RTAX_MTU, ipv6_get_mtu(dev));
	if (!dst_metric(&rt->dst, RTAX_ADVMSS))
	if (!dst_metric(&rt->dst, RTAX_ADVMSS))