Skip to content
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

Tolerate wide IP_TOS cmsgs #1274

Merged
merged 1 commit into from Dec 29, 2021
Merged

Tolerate wide IP_TOS cmsgs #1274

merged 1 commit into from Dec 29, 2021

Conversation

Ralith
Copy link
Collaborator

@Ralith Ralith commented Dec 29, 2021

@TimonPost reports encountering this consistently on WSL, and observed it at least once in our CI at https://github.com/quinn-rs/quinn/actions/runs/1630318713, manifesting as a cmsg_len of 20 rather than the expected 17. It was observed for the echo_dualstack and echo_v4 tests, but apparently not for echo_v6. Looking around the kernel source, I'm not sure how this is possible; the only origin seems to be https://elixir.bootlin.com/linux/latest/source/net/ipv4/ip_sockglue.c#L73, which has a very clearly hardcoded size of 1.

Our current behavior should be correct in release builds on little-endian systems, and harmlessly broken on big-endian systems. Still, I'd like to be able to account for why this is necessary, if nothing else so we can narrow down and perhaps someday remove the mitigation.

@djc djc merged commit 91dd91f into main Dec 29, 2021
@djc djc deleted the robust-tos branch December 29, 2021 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants