summaryrefslogtreecommitdiff
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorHannes Frederic Sowa <hannes@stressinduktion.org>2016-06-11 18:08:19 (GMT)
committerDavid S. Miller <davem@davemloft.net>2016-06-11 22:33:26 (GMT)
commit38b7097b55b6cf30adc5ac07cb1055683224393e (patch)
tree354f839048b45dcfa415469431fa4640fd6f2652 /net/ipv6/route.c
parente69f73bfecb0178ae6bd20eb778211739cd71fab (diff)
downloadlinux-38b7097b55b6cf30adc5ac07cb1055683224393e.tar.xz
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>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 969913d..c6ae6f9 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3306,6 +3306,8 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
err = -EINVAL;
memset(&fl6, 0, sizeof(fl6));
+ rtm = nlmsg_data(nlh);
+ fl6.flowlabel = ip6_make_flowinfo(rtm->rtm_tos, 0);
if (tb[RTA_SRC]) {
if (nla_len(tb[RTA_SRC]) < sizeof(struct in6_addr))