-
Notifications
You must be signed in to change notification settings - Fork 675
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
Fix endian swap on SocketAddrV6. #1964
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the breakage. Would it be possible to add a test that demonstrates the problem? Also, you should add a CHANGELOG entry.
It looks like the bug was introduced by #1711 .
This is ready to go now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but don't forget the CHANGELOG.
flowinfo and scope_id should not be byte swapped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
For multihop sessions to work, it's necessary to extract both the source and destination addresses from each received packet. Achieving this requires using lower-level APIs not directly supported by Tokio or Rust's standard library. This commit introduces the usage of the recvmsg() API from the nix crate to get that done. As result, multihop sessions now work normally. Additionally, the nix version has been updated to 0.26 to incorporate a necessary bug fix [1]. [1] nix-rust/nix#1964 Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
For multihop sessions to work, it's necessary to extract both the source and destination addresses from each received packet. Achieving this requires using lower-level APIs not directly supported by Tokio or Rust's standard library. This commit introduces the usage of the recvmsg() API from the nix crate to get that done. As result, multihop sessions now work normally. Additionally, the nix version has been updated to 0.26 to incorporate a necessary bug fix [1]. [1] nix-rust/nix#1964 Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This is a bug. flowinfo and scope_id should not be byte swapped here.
See also #1963.