I've been struggling with the RYU SDN controller working on OpenFlow13 for quite a while now. And I don't understand what we need a buffer_id for.
I am trying to write a proxy application, so when I receive 192.168.2.2 as a ipv4.dst I modify it to 172.10.2.2.
I do this using the command
actions = [parser.OFPActionSetField(eth_dst=pkt_ethernet.dst),parser.OFPActionSetField(ipv4_dst=pkt_ipv4.dst),parser.OFPActionOutput(2)]
out = parser.OFPPacketOut(datapath=datapath, buffer_id=msg.buffer_id,
in_port=in_port, actions=actions, data=data)
datapath.send_msg(out)
pkt_ipv4.dst has the new IP.
I get a bad request, OFPBRC_BUFFER_EMPTY(7)
I am trying to send the packet out without adding flows to the controller for now. But I plan to add flows later.