-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ControlMessageOwned::UdpGroSegments size mismatches the actual size #2403
Comments
devnexen
added a commit
to devnexen/nix
that referenced
this issue
May 15, 2024
The kernel, since 5.0, process the segmentation offload with a signed int. close nix-rust#2403.
IIUC, the Linux kernel itself is still using an |
devnexen
added a commit
to devnexen/nix
that referenced
this issue
May 18, 2024
The kernel, since 5.0, process the segmentation offload with a signed int. close nix-rust#2403.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/)
The text was updated successfully, but these errors were encountered: