Skip to content

_PACKET_IN_DATA_OFFSET calculation conflicts with ASSERT for OF1.3 only #207

@samwhitlock

Description

@samwhitlock

I'm working with a recent version of Indigo and the loxigen-artifacts submodule (merged the changes from today).

how to trigger

Here are the important steps in my code to trigger this bug:

  1. Create an OpenFlow 1.3 packet in object
of_packet_in_t *packet_in = (of_packet_in_t*) of_packet_in_new(OF_VERSION_1_3);

\2. Set the data in it to send to the controller (i.e., don't buffer the packet locally)

of_packet_in_data_set(packet_in, &octets);

\3. the _PACKET_IN_DATA_OFFSET macro sets the offset to 26, and the call to _END_LEN returns 8. Packet length is 34 when I observe this behavior.

\4. Because cur_len != 0 and cur_len != value->bytes in of_wire_buffer_octets_data_set, the assertion fails.


I don't observe this behavior when I use OpenFlow 1.2 packets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions