mirror of
https://repo.or.cz/socat.git
synced 2025-07-11 06:22:58 +00:00
TCP based clients try all results of name resolution until a connection succeeded
This commit is contained in:
parent
2a9623d61c
commit
cb6e16b360
16 changed files with 456 additions and 262 deletions
|
@ -45,7 +45,7 @@ int xioparsenetwork_ip4(const char *rangename, struct xiorange *range) {
|
|||
netmask_in->s_addr = htonl((0xffffffff << (32-bits)));
|
||||
}
|
||||
} else if (delimpos = strchr(rangename1, ':')) {
|
||||
if ((rc = xiogetaddrinfo(delimpos+1, NULL, PF_UNSPEC, 0, 0,
|
||||
if ((rc = xioresolve(delimpos+1, NULL, PF_INET, 0, 0,
|
||||
&sau, &socklen, 0, 0))
|
||||
!= STAT_OK) {
|
||||
return rc;
|
||||
|
@ -58,7 +58,7 @@ int xioparsenetwork_ip4(const char *rangename, struct xiorange *range) {
|
|||
}
|
||||
{
|
||||
*delimpos = 0;
|
||||
if ((rc = xiogetaddrinfo(rangename1, NULL, PF_UNSPEC, 0, 0,
|
||||
if ((rc = xioresolve(rangename1, NULL, PF_INET, 0, 0,
|
||||
&sau, &socklen, 0, 0))
|
||||
!= STAT_OK) {
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue