aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2014-04-28 22:57:34 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-30 13:31:26 -0400
commit5c98631cca574ac6255885cf372f6bcf9dcfd483 (patch)
tree53e82fe083c0db2aeca000e70872f1d01e0b4146 /net/l2tp
parenta22adce5f97c172398082bf9a713ccfba6c2364f (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/l2tp')
-rw-r--r--net/l2tp/l2tp_ip6.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index 7704ea9502fd..e472d44a3b91 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -605,14 +605,8 @@ static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk,
605 goto out; 605 goto out;
606 } 606 }
607 607
608 if (hlimit < 0) { 608 if (hlimit < 0)
609 if (ipv6_addr_is_multicast(&fl6.daddr)) 609 hlimit = ip6_sk_dst_hoplimit(np, &fl6, dst);
610 hlimit = np->mcast_hops;
611 else
612 hlimit = np->hop_limit;
613 if (hlimit < 0)
614 hlimit = ip6_dst_hoplimit(dst);
615 }
616 610
617 if (tclass < 0) 611 if (tclass < 0)
618 tclass = np->tclass; 612 tclass = np->tclass;