]> git.meshlink.io Git - meshlink/commit
Never automatically try to bind to ports >= 32768. master
authorGuus Sliepen <guus@meshlink.io>
Tue, 8 Nov 2022 21:13:42 +0000 (22:13 +0100)
committerGuus Sliepen <guus@meshlink.io>
Tue, 8 Nov 2022 21:17:13 +0000 (22:17 +0100)
commitb9185518d3e203b1cbe444b7e410ee102c6acbad
tree01c9f30450617f214652409fca3948ec81248186
parent7d21bf7e18fb37ed08a3117657c9a0ddce64432a
Never automatically try to bind to ports >= 32768.

RFC 6335 says operating systems should use ports 49152-65535 for
ephemeral ports. However, Linux and several other operating systems use
32768-65535 by default. Make sure we don't bind in that range, as a
single outgoing TCP connection that uses the same port for the local end
as MeshLink wants to use for the listening port can cause problems.
src/meshlink.c