mirror of
https://repo.or.cz/socat.git
synced 2025-07-26 12:02: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
|
@ -145,7 +145,7 @@ int _xioopen_listen(struct single *xfd, int xioflags, struct sockaddr *us, sockl
|
|||
xiosetchilddied(); /* set SIGCHLD handler */
|
||||
}
|
||||
|
||||
if ((xfd->fd = xiosocket(opts, us->sa_family, socktype, proto, level)) < 0) {
|
||||
if ((xfd->fd = xiosocket(opts, pf?pf:us->sa_family, socktype, proto, level)) < 0) {
|
||||
return STAT_RETRYLATER;
|
||||
}
|
||||
applyopts(xfd->fd, opts, PH_PASTSOCKET);
|
||||
|
@ -199,8 +199,7 @@ int _xioopen_listen(struct single *xfd, int xioflags, struct sockaddr *us, sockl
|
|||
|
||||
#if WITH_IP4 /*|| WITH_IP6*/
|
||||
if (retropt_string(opts, OPT_RANGE, &rangename) >= 0) {
|
||||
if (xioparserange(rangename, pf, &xfd->para.socket.range)
|
||||
< 0) {
|
||||
if (xioparserange(rangename, pf, &xfd->para.socket.range) < 0) {
|
||||
free(rangename);
|
||||
return STAT_NORETRY;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue