packet_to_flow_match: use OFPVID_PRESENT
The spec requires OFPVID_PRESENT (the CFI bit) to be included in the vlan_vid
value if matching on a vlan id.
diff --git a/src/python/oftest/parse.py b/src/python/oftest/parse.py
index 8c98c91..7963c0c 100644
--- a/src/python/oftest/parse.py
+++ b/src/python/oftest/parse.py
@@ -196,7 +196,7 @@
if type(layer.payload) == scapy.Dot1Q:
layer = layer.payload
match.oxm_list.append(ofp.oxm.eth_type(layer.type))
- match.oxm_list.append(ofp.oxm.vlan_vid(layer.vlan))
+ match.oxm_list.append(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT|layer.vlan))
match.oxm_list.append(ofp.oxm.vlan_pcp(layer.prio))
else:
match.oxm_list.append(ofp.oxm.eth_type(layer.type))