2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-23 14:57:06 +00:00

datapath: Always allow tunnel mask to be specified in the netlink

Netlink message usually only accpets a mask when there is a
corresponding key attribute. Tunnel mask and eth_type are the
only two expections so far.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
Andy Zhou
2013-07-31 20:39:49 -07:00
committed by Jesse Gross
parent 13d94ee9c8
commit 78f1e5c7d3

View File

@@ -135,6 +135,9 @@ static bool ovs_match_validate(const struct sw_flow_match *match,
| (1ULL << OVS_KEY_ATTR_ARP)
| (1ULL << OVS_KEY_ATTR_ND));
/* Tunnel mask is always allowed. */
mask_allowed |= (1ULL << OVS_KEY_ATTR_TUNNEL);
if (match->key->phy.in_port == DP_MAX_PORTS &&
match->mask && (match->mask->key.phy.in_port == 0xffff))
mask_allowed |= (1ULL << OVS_KEY_ATTR_IN_PORT);