Skip to content

Commit

Permalink
simple_switch: handle non-buffering switch
Browse files Browse the repository at this point in the history
Signed-off-by: FUJITA Tomonori <[email protected]>
  • Loading branch information
fujita committed Nov 1, 2014
1 parent 2528c33 commit 5021716
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ryu/app/simple_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ def _packet_in_handler(self, ev):
if out_port != ofproto.OFPP_FLOOD:
self.add_flow(datapath, msg.in_port, dst, actions)

data = None
if msg.buffer_id == ofproto.OFP_NO_BUFFER:
data = msg.data

out = datapath.ofproto_parser.OFPPacketOut(
datapath=datapath, buffer_id=msg.buffer_id, in_port=msg.in_port,
actions=actions)
actions=actions, data=data)
datapath.send_msg(out)

@set_ev_cls(ofp_event.EventOFPPortStatus, MAIN_DISPATCHER)
Expand Down

0 comments on commit 5021716

Please sign in to comment.