[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:
@@ -237,9 +237,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
|
||||
if (np)
|
||||
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 = -1;
|
||||
if (np)
|
||||
|
Reference in New Issue
Block a user