-
Notifications
You must be signed in to change notification settings - Fork 3
Description
OVS team,
We recently hit a failure with OVS when parsing the packetIn message which has delivered a large UDP packet.
According to the OpenFlow spec, the max length of an openflow message (e.g., packetIn2, https://github.com/openvswitch/ovs/blob/main/include/openflow/nicira-ext.h#L275) is 64 KB, and OVS uses uint16 as the type of length field in ofp_header. For a PacketIn message especially for PacketIn2, the content of a message includes the packet bytes and other fields like the matches, actions, notes, etc. So if the packet itself is large, e.g., 64KB, the total length of the OpenFlow message is overflowed.
From the existing OVS behavior, the message is sent to the connection to the OF controller. It may cause issues when the OF controller tries to decode the message because the length parsed in the message header is not equal to the size of the bytes received in the connection.
Steps to reproduce the issue:
- Install OpenFlow entry to packetIn UDP packets to controller
- Run OF controller locally and use a Unix Domain Socket between the OF controller and OVS
- Generate a large UDP and send into OVS bridge to enforce it be matched by the OpenFlow entry added in step 1, e.g., generate the UDP packet with 65400 bytes.
- Parse the packetIn message in OF controller.
Thanks