From: Andy Zhou Date: Thu, 1 Aug 2013 03:39:49 +0000 (-0700) Subject: datapath: Always allow tunnel mask to be specified in the netlink X-Git-Tag: sliver-openvswitch-2.0.90-1~33^2~60 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=78f1e5c7d39a27d86677bb7c301824f8a8c3a5a8 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 Signed-off-by: Jesse Gross --- diff --git a/datapath/flow.c b/datapath/flow.c index 62fdf8588..29d306230 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -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);