diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2014-04-29 11:57:34 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-30 13:31:26 -0400 |
commit | 5c98631cca574ac6255885cf372f6bcf9dcfd483 (patch) | |
tree | 53e82fe083c0db2aeca000e70872f1d01e0b4146 /net/ipv6/udp.c | |
parent | a22adce5f97c172398082bf9a713ccfba6c2364f (diff) |
net: ipv6: Introduce ip6_sk_dst_hoplimit.
This replaces 6 identical code snippets with a call to a new
static inline function.
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 1e586d92260e..d8d6ca04bb9d 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -1232,14 +1232,8 @@ do_udp_sendmsg: goto out; } - if (hlimit < 0) { - if (ipv6_addr_is_multicast(&fl6.daddr)) - hlimit = np->mcast_hops; - else - hlimit = np->hop_limit; - if (hlimit < 0) - hlimit = ip6_dst_hoplimit(dst); - } + if (hlimit < 0) + hlimit = ip6_sk_dst_hoplimit(np, &fl6, dst); if (tclass < 0) tclass = np->tclass; |