mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
ipv6: use TOS marks from sockets for routing decision
In IPv6 the ToS values are part of the flowlabel in flowi6 and get extracted during fib rule lookup, but we forgot to correctly initialize the flowlabel before the routing lookup. Reported-by: <[email protected]> Signed-off-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e69f73bfec
commit
38b7097b55
6 changed files with 23 additions and 11 deletions
|
|
@ -611,6 +611,11 @@ static int l2tp_ip6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
|
|||
|
||||
security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
|
||||
|
||||
if (ipc6.tclass < 0)
|
||||
ipc6.tclass = np->tclass;
|
||||
|
||||
fl6.flowlabel = ip6_make_flowinfo(ipc6.tclass, fl6.flowlabel);
|
||||
|
||||
dst = ip6_dst_lookup_flow(sk, &fl6, final_p);
|
||||
if (IS_ERR(dst)) {
|
||||
err = PTR_ERR(dst);
|
||||
|
|
@ -620,9 +625,6 @@ static int l2tp_ip6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
|
|||
if (ipc6.hlimit < 0)
|
||||
ipc6.hlimit = ip6_sk_dst_hoplimit(np, &fl6, dst);
|
||||
|
||||
if (ipc6.tclass < 0)
|
||||
ipc6.tclass = np->tclass;
|
||||
|
||||
if (ipc6.dontfrag < 0)
|
||||
ipc6.dontfrag = np->dontfrag;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue