]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/net/ipv6.h
ipv6: fix flow labels when the traffic class is non-0
[karo-tx-linux.git] / include / net / ipv6.h
index 7afe991e900e25838c3e66f2ff185a5226f790ff..dbf0abba33b8da21be05abf6e719f69542da80fc 100644 (file)
@@ -776,6 +776,11 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
 {
        u32 hash;
 
+       /* @flowlabel may include more than a flow label, eg, the traffic class.
+        * Here we want only the flow label value.
+        */
+       flowlabel &= IPV6_FLOWLABEL_MASK;
+
        if (flowlabel ||
            net->ipv6.sysctl.auto_flowlabels == IP6_AUTO_FLOW_LABEL_OFF ||
            (!autolabel &&