-
Notifications
You must be signed in to change notification settings - Fork 959
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
On a Google Cloud node, listening on an IPv6 address triggers a lot of listener errors #1552
Labels
Comments
I logged the output of calling the
The problem just seems to be that |
twittner
added a commit
to twittner/rust-libp2p
that referenced
this issue
Apr 23, 2020
The current behaviour of listening on an IPv6 address varies depending on the operating system's IP address stack implementation. Some support IPv4-mapped IPv6 addresses (e.g. Linux and newer versions of Windows) so a single IPv6 address would support IPv4-mapped addresses too. Others do not (e.g. OpenBSD). If they do, then some support them by default (e.g. Linux) and some do not (e.g. Windows). This PR attempts to implement the same behaviour accross operating systems. The strategy is as follows: Disable IPv4-mapped IPv6 addresses, hence the socket option IPV6_V6ONLY is always set to true. This allows binding two sockets to the same port and also avoids the problem of comparing mixed addresses which leads issues such as libp2p#1552.
twittner
added a commit
that referenced
this issue
Apr 24, 2020
* tcp: Set IPV6_V6ONLY for IPv6 listeners. The current behaviour of listening on an IPv6 address varies depending on the operating system's IP address stack implementation. Some support IPv4-mapped IPv6 addresses (e.g. Linux and newer versions of Windows) so a single IPv6 address would support IPv4-mapped addresses too. Others do not (e.g. OpenBSD). If they do, then some support them by default (e.g. Linux) and some do not (e.g. Windows). This PR attempts to implement the same behaviour accross operating systems. The strategy is as follows: Disable IPv4-mapped IPv6 addresses, hence the socket option IPV6_V6ONLY is always set to true. This allows binding two sockets to the same port and also avoids the problem of comparing mixed addresses which leads issues such as #1552. * Update CHANGELOG and address review concerns. * Update CHANGELOG.md Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
#1555 separates IPv4 and IPv6 listeners, so this mixed comparison should not happen anymore. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When listening for example on
/ip6/::/tcp/30333
, there seems to be a periodicListenerError
whose message is something like:rust-libp2p/transports/tcp/src/lib.rs
Line 469 in bbed28b
This only happens on my Google Cloud node, and not on my local machine.
The text was updated successfully, but these errors were encountered: