When key.eth_type is absent it is interpreted to be 802.2. In this case, the eth_type mask will be overridden to be exact match, regardless of the mask value specified in the netlink, or is absent.
Signed-off-by: Andy Zhou <az...@nicira.com> --- datapath/flow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datapath/flow.c b/datapath/flow.c index a2111e7..6fc09c2 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -1401,6 +1401,9 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs, SW_FLOW_KEY_PUT(match, eth.type, htons(ETH_P_802_2), is_mask); } + if (is_mask && match->key->eth.type == htons(ETH_P_802_2)) + SW_FLOW_KEY_PUT(match, eth.type, htons(0xffff), is_mask); + if (attrs & (1ULL << OVS_KEY_ATTR_IPV4)) { const struct ovs_key_ipv4 *ipv4_key; -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev