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

tcp: Set IPV6_V6ONLY for IPv6 listeners. #1555

Merged
merged 3 commits into from
Apr 24, 2020
Merged

Commits on Apr 23, 2020

  1. 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 libp2p#1552.
    twittner committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    4921502 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e3a1d35 View commit details
    Browse the repository at this point in the history
  3. Update CHANGELOG.md

    Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
    twittner and tomaka authored Apr 23, 2020
    Configuration menu
    Copy the full SHA
    be7b023 View commit details
    Browse the repository at this point in the history