Charlie
Charlie

Reputation: 333

How to change the attributions to make the actions of ryu drop the packet?

How do I send a flow entry to drop a package by using Ryu? I've learned from ryu official website how to send package out flow entry. Now I want to modify the simple_switch_13.py to drop the packet from the host1 to host2. But I can't find how to modify the PacketIn, can you help me?

In order to achieve this, I modify the app code like this: enter image description here

But you know, it does not conform to the communication in the network. But I can't have any idea.

Upvotes: 0

Views: 1548

Answers (1)

ederlf
ederlf

Reputation: 261

To drop packets in OpenFlow you just need a flow without any action. So, just remove the actions from the flow and the packets that match the flows will be dropped.

To have a flow without actions just create an empty list.

# construct action list.
actions = [] 

Upvotes: 1

Related Questions