explictly set buffer_id for packet-out messages
The old pylibopenflow library did this by default, but PyLoxi initializes that
field to zero.
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index 980099f..5c3f6f3 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -673,6 +673,7 @@
msg = ofp.message.packet_out()
msg.in_port = ing_port
+ msg.buffer_id = 0xffffffff
msg.data = str(pkt)
if action_list is not None:
for act in action_list:
diff --git a/tests/actions.py b/tests/actions.py
index 494d941..2791d5a 100644
--- a/tests/actions.py
+++ b/tests/actions.py
@@ -396,6 +396,7 @@
pkt_out =ofp.message.packet_out();
pkt_out.data = str(pkt)
pkt_out.in_port = of_ports[0]
+ pkt_out.buffer_id = 0xffffffff
act = ofp.action.output()
act.port = ofp.OFPP_TABLE
pkt_out.actions.append(act)
diff --git a/tests/basic.py b/tests/basic.py
index 66e0355..5312c1a 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -169,7 +169,8 @@
logging.info("PKT OUT test with %s, port %s" % (opt, dp_port))
msg = ofp.message.packet_out(in_port=ofp.OFPP_NONE,
data=str(outpkt),
- actions=[ofp.action.output(port=dp_port)])
+ actions=[ofp.action.output(port=dp_port)],
+ buffer_id=0xffffffff)
logging.info("PacketOut to: " + str(dp_port))
self.controller.message_send(msg)
@@ -222,7 +223,8 @@
actions = [ofp.action.output(port=port) for port in dp_ports]
msg = ofp.message.packet_out(in_port=ofp.OFPP_NONE,
data=str(outpkt),
- actions=actions)
+ actions=actions,
+ buffer_id=0xffffffff)
logging.info("PacketOut to: " + str(dp_ports))
self.controller.message_send(msg)
diff --git a/tests/load.py b/tests/load.py
index 4680edb..2631f36 100644
--- a/tests/load.py
+++ b/tests/load.py
@@ -79,6 +79,7 @@
msg = ofp.message.packet_out()
msg.in_port = lb_port
msg.data = str(pkt)
+ msg.buffer_id = 0xffffffff
act = ofp.action.output()
act.port = lb_port + 1
msg.actions.append(act)
@@ -171,6 +172,7 @@
act = ofp.action.output()
act.port = dp_port
msg.actions.append(act)
+ msg.buffer_id = 0xffffffff
logging.info("PacketOutLoad to: " + str(dp_port))
for count in range(100):
diff --git a/tests/nicira_dec_ttl.py b/tests/nicira_dec_ttl.py
index f5e8214..b29f611 100644
--- a/tests/nicira_dec_ttl.py
+++ b/tests/nicira_dec_ttl.py
@@ -26,6 +26,7 @@
outpkt = simple_tcp_packet(pktlen=100, ip_ttl=3)
msg = ofp.message.packet_out(in_port=ofp.OFPP_NONE,
data=str(outpkt),
+ buffer_id=x0xffffffff,
actions=[
ofp.action.nicira_dec_ttl(),
ofp.action.output(port=portA),
diff --git a/tests/openflow_protocol_messages.py b/tests/openflow_protocol_messages.py
index c961f2e..b30da7c 100644
--- a/tests/openflow_protocol_messages.py
+++ b/tests/openflow_protocol_messages.py
@@ -222,6 +222,7 @@
act = ofp.action.output()
act.port = dp_port
msg.actions.append(act)
+ msg.buffer_id = 0xffffffff
logging.info("PacketOut to: " + str(dp_port))
self.controller.message_send(msg)