[ovs-dev] [PATCH 2/2] datapath: Bug fix: Kernel rejects flow with valid vlan field

Andy Zhou azhou at nicira.com
Wed Jun 26 15:54:45 UTC 2013


Bug #18233

Signed-off-by: Andy Zhou <azhou at nicira.com>
---
 datapath/flow.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/datapath/flow.c b/datapath/flow.c
index 778771f..2ac36b6 100644
--- a/datapath/flow.c
+++ b/datapath/flow.c
@@ -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);
-- 
1.7.9.5




More information about the dev mailing list