Skip to contentSkip to conversation

ipv6: Remove hoplimit initialization to -1

PATCH In review Thomas Egerer 2 participants 2 messages Apr 21, 2011 – Apr 22, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6: Remove hoplimit initialization to -1

The changes introduced with git-commit a02e4b7d missed to remove the hoplimit initialization. As a result, ipv6_get_mtu interprets the return value of dst_metric_raw (-1) as 255 and answers ping6 with this hoplimit. This patche removes the line such that ping6 is answered with the hoplimit value configured via sysctl.

---
 net/ipv6/route.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
net/ipv6/route.c +0 -1
index 843406f..0a5d02a 100644
@@ -2012,7 +2012,6 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
 	rt->dst.output = ip6_output;
 	rt->rt6i_dev = net->loopback_dev;
 	rt->rt6i_idev = idev;
-	dst_metric_set(&rt->dst, RTAX_HOPLIMIT, -1);
 	rt->dst.obsolete = -1;
 
 	rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP;
maintainer
#1 lore raw

From: Thomas Egerer <[email protected]>
Date: Thu, 21 Apr 2011 10:56:02 +0200

Quoted 8 lines

The changes introduced with git-commit a02e4b7d missed to remove the hoplimit initialization. As a result, ipv6_get_mtu interprets the return value of dst_metric_raw (-1) as 255 and answers ping6 with this hoplimit. This patche removes the line such that ping6 is answered with the hoplimit value configured via sysctl.

Sorry for breaking this, patch applied.

Thanks!