mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
datapath: Bug fix: Kernel rejects flow with valid vlan field
Bug #18233 Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
@@ -1329,8 +1329,9 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs,
|
||||
__be16 tci;
|
||||
|
||||
tci = nla_get_be16(a[OVS_KEY_ATTR_VLAN]);
|
||||
if (!is_mask && (tci & htons(VLAN_TAG_PRESENT)))
|
||||
return -EINVAL;
|
||||
if (!is_mask)
|
||||
if (!(tci & htons(VLAN_TAG_PRESENT)))
|
||||
return -EINVAL;
|
||||
|
||||
SW_FLOW_KEY_PUT(match, eth.tci, tci, is_mask);
|
||||
attrs &= ~(1ULL << OVS_KEY_ATTR_VLAN);
|
||||
|
||||
Reference in New Issue
Block a user