Skip to content

Conversation

@camshaft
Copy link
Contributor

@camshaft camshaft commented Jun 16, 2023

Description of changes:

In testing, I was seeing ECN markings get disabled. After some digging, this is due to the OS returning both pktinfo and pktinfo6 and the cmsg buffer not having enough capacity for those.

As such, I've added the sizes for both rather than taking the max.

Testing:

I also added an assertion to make sure the cmsg buffer wasn't truncated in testing. I didn't make it a debug_assert, since I'm not sure if the OS will randomly return more cmsgs or not and didn't want the application to panic.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft marked this pull request as ready for review June 16, 2023 20:19
@camshaft camshaft requested a review from WesleyRosenblum June 16, 2023 20:20
@camshaft camshaft merged commit ac0a964 into main Jun 16, 2023
@camshaft camshaft deleted the camshaft/cmsg-buffer-size branch June 16, 2023 23:25
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.

2 participants