Add back address resolution test

Mistakenly removed by a1a58143e
This commit is contained in:
James R 2021-09-03 16:48:29 -07:00
parent 39fdbac2ac
commit b2fe36fe5b

View file

@ -1204,7 +1204,11 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port)
// test ip address of server // test ip address of server
for (i = 0; i < mysocketses; ++i) for (i = 0; i < mysocketses; ++i)
{ {
if (runp->ai_addr->sa_family == myfamily[i]) /* sendto tests that there is a network to this
address */
if (runp->ai_addr->sa_family == myfamily[i] &&
sendto(mysockets[i], NULL, 0, 0,
runp->ai_addr, runp->ai_addrlen) == 0)
{ {
memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen); memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen);
break; break;