diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2014-04-28 22:57:34 -0400 |
---|---|---|
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: | |||
1232 | goto out; | 1232 | goto out; |
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | if (hlimit < 0) { | 1235 | if (hlimit < 0) |
1236 | if (ipv6_addr_is_multicast(&fl6.daddr)) | 1236 | hlimit = ip6_sk_dst_hoplimit(np, &fl6, dst); |
1237 | hlimit = np->mcast_hops; | ||
1238 | else | ||
1239 | hlimit = np->hop_limit; | ||
1240 | if (hlimit < 0) | ||
1241 | hlimit = ip6_dst_hoplimit(dst); | ||
1242 | } | ||
1243 | 1237 | ||
1244 | if (tclass < 0) | 1238 | if (tclass < 0) |
1245 | tclass = np->tclass; | 1239 | tclass = np->tclass; |