-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
OpenBSD socket address is padded with zeroes #116523
Comments
This is an OpenBSD bug. I've reported it here: https://marc.info/?l=openbsd-bugs&m=170105481926736&w=2 Still, we should work around it in the standard library. |
Just to be clear, this is not an OpenBSD bug. OpenBSD decided to return always the full |
Original diff from @notgull in rust-lang#118349, small changes from me. on OpenBSD, getsockname(2) returns the actual size of the socket address, and not the len of the content. Figure out the length for ourselves. see https://marc.info/?l=openbsd-bugs&m=170105481926736&w=2 Fixes rust-lang#116523
…Mark-Simulacrum OpenBSD fix long socket addresses Original diff from `@notgull` in rust-lang#118349, small changes from me. on OpenBSD, getsockname(2) returns the actual size of the socket address, and not the len of the content. Figure out the length for ourselves. see https://marc.info/?l=openbsd-bugs&m=170105481926736&w=2 Fixes rust-lang#116523
…Mark-Simulacrum OpenBSD fix long socket addresses Original diff from ``@notgull`` in rust-lang#118349, small changes from me. on OpenBSD, getsockname(2) returns the actual size of the socket address, and not the len of the content. Figure out the length for ourselves. see https://marc.info/?l=openbsd-bugs&m=170105481926736&w=2 Fixes rust-lang#116523
Rollup merge of rust-lang#123779 - semarie:notgull-openbsd-socket, r=Mark-Simulacrum OpenBSD fix long socket addresses Original diff from ``@notgull`` in rust-lang#118349, small changes from me. on OpenBSD, getsockname(2) returns the actual size of the socket address, and not the len of the content. Figure out the length for ourselves. see https://marc.info/?l=openbsd-bugs&m=170105481926736&w=2 Fixes rust-lang#116523
Original diff from @notgull in rust-lang#118349, small changes from me. on OpenBSD, getsockname(2) returns the actual size of the socket address, and not the len of the content. Figure out the length for ourselves. see https://marc.info/?l=openbsd-bugs&m=170105481926736&w=2 Fixes rust-lang#116523
I tried this code on my Linux machine:
I got this output:
However, on OpenBSD 7, I got this output:
I expected the output to be the same as Linux: not padded with zeroes like this.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: