Skip to content

Commit

Permalink
datapath: Don't validate IPv6 label masks.
Browse files Browse the repository at this point in the history
When userspace doesn't provide a mask, OVS datapath generates a fully
unwildcarded mask for the flow by copying the flow and setting all bits
in all fields. For IPv6 label, this creates a mask that matches on the
upper 12 bits, causing the following error:

openvswitch: netlink: Invalid IPv6 flow label value (value=ffffffff, max=fffff)

This patch ignores the label validation check for masks, avoiding this
error.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
joestringer committed Nov 25, 2014
1 parent a70f8b1 commit 6572103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datapath/flow_netlink.c
Expand Up @@ -772,7 +772,7 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs,
ipv6_key->ipv6_frag, OVS_FRAG_TYPE_MAX);
return -EINVAL;
}
if (ipv6_key->ipv6_label & htonl(0xFFF00000)) {
if (!is_mask && ipv6_key->ipv6_label & htonl(0xFFF00000)) {
OVS_NLERR(log,
"Invalid IPv6 flow label value (value=%x, max=%x).",
ntohl(ipv6_key->ipv6_label), (1 << 20) - 1);
Expand Down

0 comments on commit 6572103

Please sign in to comment.