From beb010bf504f70b561b1ae8cd6da5e5e35b34d5f Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Tue, 15 Nov 2011 18:35:26 -0800 Subject: [PATCH] flow: flow_extract() improperly parses IPv6 TOS bits. This problem could cause userspace to automatically evict IPv6 flows from the datapath which had TOS bits set. Bug #8323. --- lib/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flow.c b/lib/flow.c index fc09a77a7..519c87850 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -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) { -- 2.43.0