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

Protocol not available (os error 42) #1624

Closed
jieliangma opened this issue Aug 9, 2023 · 4 comments
Closed

Protocol not available (os error 42) #1624

jieliangma opened this issue Aug 9, 2023 · 4 comments

Comments

@jieliangma
Copy link

jieliangma commented Aug 9, 2023

version: 0.10.2
device: iPhone SE2, iOS 13.6.1
quinn::Endpoint::client("0.0.0.0:0".parse()?)? got an error: Protocol not available (os error 42)

@djc
Copy link
Member

djc commented Aug 9, 2023

That's pretty strange. Can you dig into the code inside Endpoint::client() and see which call is failing? Is it the UdpSocket::bind(), something in quinn_udp::unix::init() (called by wrap_with_socket())? We have had people use the library on iOS before so it should work but maybe the version you have is too old. Have you tried earlier versions?

@djc
Copy link
Member

djc commented Aug 9, 2023

Hmm, we specifically called out older macOS compatibility in #1547, so that might be relevant here -- the feature we used there was added in Big Sur (v11, released in 2020) whereas iOS 13 is from 2019.

Happy to review a PR to enable compatibility here.

@jieliangma
Copy link
Author

jieliangma commented Aug 9, 2023

in file quinn-udp/src/unix.rs

    #[cfg(any(target_os = "freebsd", target_os = "macos", target_os = "ios"))]
    {
        if is_ipv4 {
            set_socket_option(&*io, libc::IPPROTO_IP, libc::IP_DONTFRAG, OPTION_ON)?; //  this line failing
        }
    }

quinn version 0.8 works fine,
version 0.10 failed

@djc
Copy link
Member

djc commented Aug 9, 2023

Yup, that's it. So we'll probably want to ignore this particular error value here, at least for macOS?

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

No branches or pull requests

2 participants