mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
add warning about IPV6_V6ONLY=false not working on FreeBSD
This commit is contained in:
parent
a0040d8c57
commit
0d848fda7c
@ -174,6 +174,10 @@ void TNetwork::TCPServerMain() {
|
|||||||
if (ec) {
|
if (ec) {
|
||||||
beammp_warnf("Failed to unset IP_V6ONLY on TCP, only IPv6 will work: {}", ec.message());
|
beammp_warnf("Failed to unset IP_V6ONLY on TCP, only IPv6 will work: {}", ec.message());
|
||||||
}
|
}
|
||||||
|
#if defined(BEAMMP_FREEBSD)
|
||||||
|
beammp_warnf("WARNING: On FreeBSD, for IPv4 to work, you must run `sysctl net.inet6.ip6.v6only=0`!");
|
||||||
|
beammp_debugf("This is due to an annoying detail in the *BSDs: In the name of security, unsetting the IPV6_V6ONLY option does not work by default (but does not fail???), as it allows IPv4 mapped IPv6 like ::ffff:127.0.0.1, which they deem a security issue.");
|
||||||
|
#endif
|
||||||
socket_base::linger LingerOpt {};
|
socket_base::linger LingerOpt {};
|
||||||
LingerOpt.enabled(false);
|
LingerOpt.enabled(false);
|
||||||
Listener.set_option(LingerOpt, ec);
|
Listener.set_option(LingerOpt, ec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user