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

unexpected address family 17 #1343

Closed
internetionals opened this issue Nov 27, 2020 · 0 comments · Fixed by #1344
Closed

unexpected address family 17 #1343

internetionals opened this issue Nov 27, 2020 · 0 comments · Fixed by #1344

Comments

@internetionals
Copy link
Contributor

When calling recvfrom on a socket(AddressFamily::Packet, SockType::Datagram, ...) socket I receive this panic from inside nix::sys::socket::sockaddr_storage_to_addr:

thread 'main' panicked at 'unexpected address family 17', /usr/local/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/nix-0.19.0/src/sys/socket/mod.rs:1744:15
stack backtrace:
   0: rust_begin_unwind
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
   1: std::panicking::begin_panic_fmt
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:429
   2: nix::sys::socket::sockaddr_storage_to_addr
             at /usr/local/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/nix-0.19.0/src/sys/socket/mod.rs:1744
   3: nix::sys::socket::recvfrom
             at /usr/local/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/nix-0.19.0/src/sys/socket/mod.rs:1540

It appears that this function doesn't have a handler for this address family, even though it appears supported on all other fronts.

The panic also made it impossible to handle this in some other way, but apart from adding a SockAddr::Unknown, or hijacking some Errno, I don't see any option that would make sense API wise.

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 a pull request may close this issue.

1 participant