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/raw.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/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index a9e4235157a..548d0763f4d 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -885,9 +885,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
885 | else | 885 | else |
886 | hlimit = np->hop_limit; | 886 | hlimit = np->hop_limit; |
887 | if (hlimit < 0) | 887 | if (hlimit < 0) |
888 | hlimit = dst_metric(dst, RTAX_HOPLIMIT); | 888 | hlimit = ip6_dst_hoplimit(dst); |
889 | if (hlimit < 0) | ||
890 | hlimit = ipv6_get_hoplimit(dst->dev); | ||
891 | } | 889 | } |
892 | 890 | ||
893 | if (tclass < 0) { | 891 | if (tclass < 0) { |