diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 63d232f0c..12a29599e 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -1148,7 +1148,7 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port) DEBFILE(va("Creating new node: %s@%s\n", address, port)); memset (&hints, 0x00, sizeof (hints)); - hints.ai_flags = 0; + hints.ai_flags = AI_ADDRCONFIG; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; @@ -1178,7 +1178,7 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port) } } - if (i < mysocketses) + if (i >= mysocketses) runp = runp->ai_next; else break;