Skip to content

ControlMessageOwned::UdpGroSegments size mismatches the actual size #2403

Closed
@zhaiyan920

Description

@zhaiyan920

UdpGroSegments is declared as a u16 cmsg in the library but the Linux kernel actually puts an int in the cmsg:

https://elixir.bootlin.com/linux/latest/source/include/linux/udp.h#L145

So applications using this option will break on big endian Linux machines. To fix it, the size may need to be adjusted to the size of an int for related kernel versions (doubt kernel maintainers might not change this in hope to not break user space: https://lore.kernel.org/netdev/CANn89iL2PCnC=6dOrozW0309W==tWcKpj2iwZgZAD_s0amvzLA@mail.gmail.com/T/)

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