mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
a22adce5f9
commit
5c98631cca
8 changed files with 28 additions and 48 deletions
|
|
@ -605,14 +605,8 @@ static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk,
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue