You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
TCP/UDP Listen sockets can now be set to IPv6 only
(cherry picked from commit eb27e993f0)
This commit is contained in:
@@ -56,8 +56,8 @@ static int _socket_create(IP_Address::AddrType p_type, int type, int protocol) {
|
||||
|
||||
if(family == AF_INET6) {
|
||||
// Ensure IPv4 over IPv6 is enabled
|
||||
int v6_only = 0;
|
||||
if(setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&v6_only, sizeof(v6_only)) != 0) {
|
||||
int no = 0;
|
||||
if(setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&no, sizeof(no)) != 0) {
|
||||
WARN_PRINT("Unable to set IPv4 address mapping over IPv6");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user