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: <liam.mcbirnie@boeing.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e69f73bfec
commit
38b7097b55
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user