Toralf Wittner bdbab32392
tcp: Set IPV6_V6ONLY for IPv6 listeners. (#1555)
* 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>
2020-04-24 19:07:27 +02:00
2020-04-09 16:54:01 +02:00
2020-04-09 16:54:01 +02:00
2020-04-09 16:54:01 +02:00
2020-03-11 15:33:22 +01:00
2017-11-08 13:03:59 +01:00

Central repository for work on libp2p

dependency status

This repository is the central place for Rust development of the libp2p spec.

Warning: While we are trying our best to be compatible with other libp2p implementations, we cannot guarantee that this is the case considering the lack of a precise libp2p specifications.

Documentation

How to use the library?

Where to ask questions?

  • In the Rust section of https://discuss.libp2p.io.
  • In the #libp2p IRC channel on freenode.
  • By opening an issue in this repository.

Notable users

(open a pull request if you want your project to be added here)

Description
No description provided
Readme MIT 23 MiB
Languages
Rust 99.8%
JavaScript 0.2%