testutils: fix flow_match_test when exp_pkt is None
This fixes a bug introduced in e4b384df, which removed code it shouldn't have.
Reported by Tony van der Peet.
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index a7245fa..8b27f25 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -795,6 +795,8 @@
logging.debug(" WC: " + hex(wildcards) + " vlan: " + str(vlan_vid))
if pkt is None:
pkt = simple_tcp_packet(dl_vlan_enable=(vlan_vid >= 0), vlan_vid=vlan_vid)
+ if exp_pkt is None:
+ exp_pkt = pkt
request = flow_msg_create(parent, pkt, ing_port=ing_port,
wildcards=wildcards, egr_ports=egr_ports,
@@ -823,6 +825,8 @@
if pkt is None:
pkt = simple_tcp_packet(dl_vlan_enable=(vlan_vid >= 0), vlan_vid=vlan_vid)
+ if exp_pkt is None:
+ exp_pkt = pkt
msg = ofp.message.packet_out()
msg.in_port = ing_port