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

OpenBSD fix long socket addresses #118349

Closed
wants to merge 5 commits into from
Closed

Commits on Dec 2, 2023

  1. OpenBSD fix long socket addresses

    There is an OpenBSD bug where the "len" returned by functions like
    "getsockname" is too long and makes it so the resulting address contains
    zero bytes. While this isn't a problem for C code, where strings are
    null terminated anyways, it's a problem for Rust.
    
    This commit fixes this issue by adding a check that truncates the
    address length to the first zero when OpenBSD is detected. If there are
    no zeroes, it just uses the original length provided by the system.
    
    Signed-off-by: John Nunley <dev@notgull.net>
    notgull committed Dec 2, 2023
    Copy the full SHA
    fe1d97b View commit details
    Browse the repository at this point in the history
  2. bug -> feature

    Signed-off-by: John Nunley <dev@notgull.net>
    notgull committed Dec 2, 2023
    Copy the full SHA
    da6b4f6 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2024

  1. chore: Review comments

    Signed-off-by: John Nunley <dev@notgull.net>
    notgull committed Feb 18, 2024
    Copy the full SHA
    d1090cf View commit details
    Browse the repository at this point in the history
  2. chore: Fix tidy

    Signed-off-by: John Nunley <dev@notgull.net>
    notgull committed Feb 18, 2024
    Copy the full SHA
    731b456 View commit details
    Browse the repository at this point in the history
  3. chore: Fix binary operation

    Signed-off-by: John Nunley <dev@notgull.net>
    notgull committed Feb 18, 2024
    Copy the full SHA
    b7eebfa View commit details
    Browse the repository at this point in the history