aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ipv6_sockglue.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-10 06:00:30 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-24 21:24:00 -0400
commit6b75d0908185bf853b188afa6f269426f6554c5b (patch)
tree85f28296077f3d873bbda249dc0eafcc911164fd /net/ipv6/ipv6_sockglue.c
parent4725474584d6aa2f07b3d47442dfbc4f6544f65e (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/ipv6_sockglue.c')
-rw-r--r--net/ipv6/ipv6_sockglue.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index c11c76cab371..8e29fb1d1df6 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -904,9 +904,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
904 dst = sk_dst_get(sk); 904 dst = sk_dst_get(sk);
905 if (dst) { 905 if (dst) {
906 if (val < 0) 906 if (val < 0)
907 val = dst_metric(dst, RTAX_HOPLIMIT); 907 val = ip6_dst_hoplimit(dst);
908 if (val < 0)
909 val = ipv6_get_hoplimit(dst->dev);
910 dst_release(dst); 908 dst_release(dst);
911 } 909 }
912 if (val < 0) 910 if (val < 0)