diff options
author | Joe Stringer <joestringer@nicira.com> | 2014-11-19 16:54:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-20 22:56:13 -0500 |
commit | d3052bb5d306b29c1e7d9e5998c5ac4ca1ff0ca9 (patch) | |
tree | 16383bb53c7b2edd338cb465ea6bfc41b368fad6 /net/openvswitch/flow_netlink.c | |
parent | a5f6fc28d6e6cc379c6839f21820e62262419584 (diff) |
openvswitch: Don't validate IPv6 label masks.
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>
Diffstat (limited to 'net/openvswitch/flow_netlink.c')
-rw-r--r-- | net/openvswitch/flow_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index fa4ec2e4a78b..089b195c064a 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c | |||
@@ -690,7 +690,7 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs, | |||
690 | return -EINVAL; | 690 | return -EINVAL; |
691 | } | 691 | } |
692 | 692 | ||
693 | if (ipv6_key->ipv6_label & htonl(0xFFF00000)) { | 693 | if (!is_mask && ipv6_key->ipv6_label & htonl(0xFFF00000)) { |
694 | OVS_NLERR("IPv6 flow label %x is out of range (max=%x).\n", | 694 | OVS_NLERR("IPv6 flow label %x is out of range (max=%x).\n", |
695 | ntohl(ipv6_key->ipv6_label), (1 << 20) - 1); | 695 | ntohl(ipv6_key->ipv6_label), (1 << 20) - 1); |
696 | return -EINVAL; | 696 | return -EINVAL; |