cunicu / go-rosenpass

A port of Rosenpass post-quantum key-exchange protocol to Go.
Apache License 2.0
19 stars 1 forks source link

Check dual-stack support for OpenBSD and other platforms #25

Closed stv0g closed 1 year ago

stv0g commented 1 year ago
// BUG(rsc,mikio): On DragonFly BSD and OpenBSD, listening on the
// "tcp" and "udp" networks does not listen for both IPv4 and IPv6
// connections. This is due to the fact that IPv4 traffic will not be
// routed to an IPv6 socket - two separate sockets are required if
// both address families are to be supported.
// See inet6(4) for details.

Source: https://go.dev/src/net/ipsock.go

Workaround: Open two sockets for DragonFly and OpenBSD.

This issue does not seem to affect Windows.

stv0g commented 1 year ago

We now support listening on multiple addresses to for all platforms.

If no listen address is configured explicitly, we automatically listen on all available addresses.

In this case:

We don't support listening on multiple addresses of the same address familiy yet. In order to support this, we must keep track over which socket we have received data from a peer to choose the correct socket.

Open question: which socket should be used if we initiate a handshake and have not received data from a peer?

Related: https://github.com/rosenpass/rosenpass/issues/77