mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Enable ipv6_server by default
This commit is contained in:
parent
a11d526110
commit
d027fc9a88
3 changed files with 6 additions and 4 deletions
|
@ -835,11 +835,12 @@ protocol_version_min (Protocol version minimum) int 1 1 65535
|
||||||
# Files that are not present will be fetched the usual way.
|
# Files that are not present will be fetched the usual way.
|
||||||
remote_media (Remote media) string
|
remote_media (Remote media) string
|
||||||
|
|
||||||
# Enable/disable running an IPv6 server.
|
# Enable IPv6 support for server.
|
||||||
|
# Note that clients will be able to connect with both IPv4 and IPv6.
|
||||||
# Ignored if bind_address is set.
|
# Ignored if bind_address is set.
|
||||||
#
|
#
|
||||||
# Requires: enable_ipv6
|
# Requires: enable_ipv6
|
||||||
ipv6_server (IPv6 server) bool false
|
ipv6_server (IPv6 server) bool true
|
||||||
|
|
||||||
[*Server Security]
|
[*Server Security]
|
||||||
|
|
||||||
|
|
|
@ -422,7 +422,7 @@ void set_default_settings()
|
||||||
|
|
||||||
// Network
|
// Network
|
||||||
settings->setDefault("enable_ipv6", "true");
|
settings->setDefault("enable_ipv6", "true");
|
||||||
settings->setDefault("ipv6_server", "false");
|
settings->setDefault("ipv6_server", "true");
|
||||||
settings->setDefault("max_packets_per_iteration", "1024");
|
settings->setDefault("max_packets_per_iteration", "1024");
|
||||||
settings->setDefault("port", "30000");
|
settings->setDefault("port", "30000");
|
||||||
settings->setDefault("strict_protocol_version_checking", "false");
|
settings->setDefault("strict_protocol_version_checking", "false");
|
||||||
|
|
|
@ -128,7 +128,8 @@ void UDPSocket::Bind(Address addr)
|
||||||
if (setsockopt(m_handle, IPPROTO_IPV6, IPV6_V6ONLY,
|
if (setsockopt(m_handle, IPPROTO_IPV6, IPV6_V6ONLY,
|
||||||
reinterpret_cast<char *>(&value), sizeof(value)) != 0) {
|
reinterpret_cast<char *>(&value), sizeof(value)) != 0) {
|
||||||
auto errmsg = SOCKET_ERR_STR(LAST_SOCKET_ERR());
|
auto errmsg = SOCKET_ERR_STR(LAST_SOCKET_ERR());
|
||||||
errorstream << "Failed to disable V6ONLY: " << errmsg << std::endl;
|
errorstream << "Failed to disable V6ONLY: " << errmsg
|
||||||
|
<< "\nTry disabling ipv6_server to fix this." << std::endl;
|
||||||
throw SocketException(errmsg);
|
throw SocketException(errmsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue