simple_switch_12: handle non-buffering switch

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
FUJITA Tomonori 2014-11-01 05:26:35 +01:00
parent 5021716be3
commit 89c339634b

View File

@ -81,7 +81,11 @@ class SimpleSwitch12(app_manager.RyuApp):
if out_port != ofproto.OFPP_FLOOD: if out_port != ofproto.OFPP_FLOOD:
self.add_flow(datapath, in_port, dst, actions) self.add_flow(datapath, in_port, dst, actions)
data = None
if msg.buffer_id == ofproto.OFP_NO_BUFFER:
data = msg.data
out = datapath.ofproto_parser.OFPPacketOut( out = datapath.ofproto_parser.OFPPacketOut(
datapath=datapath, buffer_id=msg.buffer_id, in_port=in_port, datapath=datapath, buffer_id=msg.buffer_id, in_port=in_port,
actions=actions) actions=actions, data=data)
datapath.send_msg(out) datapath.send_msg(out)