-
Notifications
You must be signed in to change notification settings - Fork 677
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
Sending multiple ControlMessage in a single Unix Socket packet fails #756
Comments
I have found out (via experiment) that Linux will merge two control messages of type Check out what the test actually sends over the socket:
The result should contain exactly one
As you can see, it contains two separate messages, each with only one fd in them (
Again, the output should contain exactly one
This one contains just a single message, but with two fds:
It's definitely a good idea to check that stuffing N file descriptors into the ancillary data results in N fds coming out on the other end, the test just need to be more permissive and perhaps sum the fd counts in all control messages to be safe. Additionally, a test should be written that sends two different control messages over the socket so they can't possibly be merged by the kernel. This would properly test decoding of multiple messages. |
This is a continuation of #464 and #473. For some reason, the attached test still fails.
IIRC, there's a problem in the way we encode multiple Control Messages which causes the kernel to only consider the first Control Message sent. The specifics of where the bug is, I have no idea.
The failing test
The text was updated successfully, but these errors were encountered: