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

Discussion: Dual-stack footguns #227

Open
Ralith opened this issue Jun 26, 2017 · 4 comments
Open

Discussion: Dual-stack footguns #227

Ralith opened this issue Jun 26, 2017 · 4 comments

Comments

@Ralith
Copy link
Contributor

Ralith commented Jun 26, 2017

On Linux, communicating with IPv4 hosts using an IPv6 socket will typically Just Work. However, on Windows it will produce a mysterious WSAEFAULT error unless IPV6_V6ONLY is explicitly turned off in advance. Linux can also be configured to default that option on, and OpenBSD does not permit it to be turned off at all.

Should tokio (or mio) make an effort to provide clearer error messages and/or a consistent default behavior in this circumstance?

@carllerche
Copy link
Member

I would say yes for the TcpStream types that are provided as they are intended to be friendly / portable. This seems like a similar problem that std TcpStream would have as well?

@alexcrichton
Copy link
Contributor

I somewhat recall this coming up in discussions in the standard library historically, and I'd imagine we should just mirror what libstd does.

@carllerche
Copy link
Member

@alexcrichton do you remember what that was?

@alexcrichton
Copy link
Contributor

I'm thinking of rust-lang/rust#34440 (which I've now dug up). The conclusion there was that libstd didn't change, which to me means that we probably don't want to change tokio-core

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

3 participants