diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-10 06:00:30 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-24 21:24:00 -0400 |
commit | 6b75d0908185bf853b188afa6f269426f6554c5b (patch) | |
tree | 85f28296077f3d873bbda249dc0eafcc911164fd /net/ipv6/icmp.c | |
parent | 4725474584d6aa2f07b3d47442dfbc4f6544f65e (diff) |
[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>
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 6b5391ab8346..86332417b402 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -464,9 +464,7 @@ route_done: | |||
464 | else | 464 | else |
465 | hlimit = np->hop_limit; | 465 | hlimit = np->hop_limit; |
466 | if (hlimit < 0) | 466 | if (hlimit < 0) |
467 | hlimit = dst_metric(dst, RTAX_HOPLIMIT); | 467 | hlimit = ip6_dst_hoplimit(dst); |
468 | if (hlimit < 0) | ||
469 | hlimit = ipv6_get_hoplimit(dst->dev); | ||
470 | 468 | ||
471 | tclass = np->tclass; | 469 | tclass = np->tclass; |
472 | if (tclass < 0) | 470 | if (tclass < 0) |
@@ -560,9 +558,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) | |||
560 | else | 558 | else |
561 | hlimit = np->hop_limit; | 559 | hlimit = np->hop_limit; |
562 | if (hlimit < 0) | 560 | if (hlimit < 0) |
563 | hlimit = dst_metric(dst, RTAX_HOPLIMIT); | 561 | hlimit = ip6_dst_hoplimit(dst); |
564 | if (hlimit < 0) | ||
565 | hlimit = ipv6_get_hoplimit(dst->dev); | ||
566 | 562 | ||
567 | tclass = np->tclass; | 563 | tclass = np->tclass; |
568 | if (tclass < 0) | 564 | if (tclass < 0) |