mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-24 00:29:58 -05:00
- Fix fastopen EPIPE fallthrough to perform connect.
git-svn-id: file:///svn/unbound/trunk@4203 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
69828ed94b
commit
401e456a17
2 changed files with 23 additions and 1 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
1 June 2017: Wouter
|
||||||
|
- Fix fastopen EPIPE fallthrough to perform connect.
|
||||||
|
|
||||||
31 May 2017: Ralph
|
31 May 2017: Ralph
|
||||||
- Also use global local-zones when there is a matching view that does
|
- Also use global local-zones when there is a matching view that does
|
||||||
not have any local-zone specified.
|
not have any local-zone specified.
|
||||||
|
|
|
||||||
|
|
@ -1415,7 +1415,26 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* fallthrough to nonFASTOPEN
|
/* fallthrough to nonFASTOPEN
|
||||||
* (MSG_FASTOPEN on Linux 3 produces EPIPE) */
|
* (MSG_FASTOPEN on Linux 3 produces EPIPE)
|
||||||
|
* we need to perform connect() */
|
||||||
|
if(connect(fd, &c->repinfo.addr, c->repinfo.addrlen) == -1) {
|
||||||
|
#ifdef EINPROGRESS
|
||||||
|
if(errno == EINPROGRESS)
|
||||||
|
return 1; /* wait until connect done*/
|
||||||
|
#endif
|
||||||
|
#ifdef USE_WINSOCK
|
||||||
|
if(WSAGetLastError() == WSAEINPROGRESS ||
|
||||||
|
WSAGetLastError() == WSAEWOULDBLOCK)
|
||||||
|
return 1; /* wait until connect done*/
|
||||||
|
#endif
|
||||||
|
if(tcp_connect_errno_needs_log(
|
||||||
|
&c->repinfo.addr, c->repinfo.addrlen)) {
|
||||||
|
log_err_addr("outgoing tcp: connect after EPIPE for fastopen",
|
||||||
|
strerror(errno), &c->repinfo.addr, c->repinfo.addrlen);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
c->tcp_byte_count += r;
|
c->tcp_byte_count += r;
|
||||||
if(c->tcp_byte_count < sizeof(uint16_t))
|
if(c->tcp_byte_count < sizeof(uint16_t))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue