datapath: Always allow tunnel mask to be specified in the netlink
authorAndy Zhou <azhou@nicira.com>
Thu, 1 Aug 2013 03:39:49 +0000 (20:39 -0700)
committerJesse Gross <jesse@nicira.com>
Thu, 1 Aug 2013 16:23:26 +0000 (09:23 -0700)
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>
datapath/flow.c

index 62fdf85..29d3062 100644 (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);