flow: flow_extract() improperly parses IPv6 TOS bits.
[sliver-openvswitch.git] / lib / flow.c
index fc09a77..519c878 100644 (file)
@@ -150,7 +150,7 @@ parse_ipv6(struct ofpbuf *packet, struct flow *flow)
     flow->ipv6_dst = nh->ip6_dst;
 
     tc_flow = get_unaligned_be32(&nh->ip6_flow);
-    flow->nw_tos = (ntohl(tc_flow) >> 4) & IP_DSCP_MASK;
+    flow->nw_tos = (ntohl(tc_flow) >> 20) & IP_DSCP_MASK;
     flow->nw_proto = IPPROTO_NONE;
 
     while (1) {