Hello,

I am trying to modify chosen protocol packets in controller.
I have created flow with priority 2 matching ICMP packets, which sends them to the controller:

1. cookie=0x0, duration=58.884s, table=0, n_packets=9, n_bytes=882, priority=2,icmp actions=CONTROLLER:65535

In the controller, depending on the packet content, I modify it (or not) and then send it back to the switch to be forwarded as the rest of the traffic. For that I have created a flow matching packets with in_port=CONTROLLER, given priority 3. This flow forwards packets to another Flow table, where they are matched and forwarded to specified ports:

2. cookie=0x0, duration=58.884s, table=0, n_packets=0, n_bytes=0, priority=3,in_port=CONTROLLER actions=goto_table:1

However, packets sent from controller match with first flow rather than the second one. It seems their in_port is not CONTROLLER.

This is how I tried to send packets from controller back to switch:

 *   out = parser.OFPPacketOut(datapath=datapath,
   buffer_id=ofproto.OFP_NO_BUFFER, in_port=ofproto.OFPP_CONTROLLER,
   actions=actions, data=data)

 *   out = parser.OFPPacketOut(datapath=datapath,
   buffer_id=ofproto.msg.buffer_id,  in_port=msg.match['in_port'],
   actions=actions, data=data)


Is there any way to manually change the 'in_port' before sending the packet? Or any other way to distinguish packets coming from controller (set packet cookie, ...)?

Thank you.

Best begards

Michal Palatinus
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to