[IPV6]: Optimize hop-limit determination.
Last part of hop-limit determination is always: hoplimit = dst_metric(dst, RTAX_HOPLIMIT); if (hoplimit < 0) hoplimit = ipv6_get_hoplimit(dst->dev). Let's consolidate it as ip6_dst_hoplimit(dst). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
This commit is contained in:
@@ -464,9 +464,7 @@ route_done:
|
||||
else
|
||||
hlimit = np->hop_limit;
|
||||
if (hlimit < 0)
|
||||
hlimit = dst_metric(dst, RTAX_HOPLIMIT);
|
||||
if (hlimit < 0)
|
||||
hlimit = ipv6_get_hoplimit(dst->dev);
|
||||
hlimit = ip6_dst_hoplimit(dst);
|
||||
|
||||
tclass = np->tclass;
|
||||
if (tclass < 0)
|
||||
@@ -560,9 +558,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
|
||||
else
|
||||
hlimit = np->hop_limit;
|
||||
if (hlimit < 0)
|
||||
hlimit = dst_metric(dst, RTAX_HOPLIMIT);
|
||||
if (hlimit < 0)
|
||||
hlimit = ipv6_get_hoplimit(dst->dev);
|
||||
hlimit = ip6_dst_hoplimit(dst);
|
||||
|
||||
tclass = np->tclass;
|
||||
if (tclass < 0)
|
||||
|
Reference in New Issue
Block a user