mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-31 03:49:35 -05:00
- Fix issue on macOX 10.10 where TCP fast open is detected but not
implemented causing TCP to fail. The fix allows fallback to regular TCP in this case and is also more robust for cases where connectx() fails for some reason. git-svn-id: file:///svn/unbound/trunk@4304 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
293e94d0ed
commit
b320c7ebd5
2 changed files with 15 additions and 0 deletions
|
|
@ -4,6 +4,10 @@
|
|||
installs between sep11 and oct11 2017.
|
||||
- tag 1.6.5 with pointrelease 1.6.5 (1.6.4 plus 5011 fix).
|
||||
- trunk version 1.6.6 in development.
|
||||
- Fix issue on macOX 10.10 where TCP fast open is detected but not
|
||||
implemented causing TCP to fail. The fix allows fallback to regular
|
||||
TCP in this case and is also more robust for cases where connectx()
|
||||
fails for some reason.
|
||||
|
||||
10 August 2017: Wouter
|
||||
- Patch to show DNSCrypt status in help output, from Carsten
|
||||
|
|
|
|||
|
|
@ -268,6 +268,13 @@ outnet_tcp_take_into_use(struct waiting_tcp* w, uint8_t* pkt, size_t pkt_len)
|
|||
if (connectx(s, &endpoints, SAE_ASSOCID_ANY,
|
||||
CONNECT_DATA_IDEMPOTENT | CONNECT_RESUME_ON_READ_WRITE,
|
||||
NULL, 0, NULL, NULL) == -1) {
|
||||
/* if fails, failover to connect for OSX 10.10 */
|
||||
#ifdef EINPROGRESS
|
||||
if(errno != EINPROGRESS) {
|
||||
#else
|
||||
if(1) {
|
||||
#endif
|
||||
if(connect(s, (struct sockaddr*)&w->addr, w->addrlen) == -1) {
|
||||
#else /* USE_OSX_MSG_FASTOPEN*/
|
||||
#ifdef USE_MSG_FASTOPEN
|
||||
pend->c->tcp_do_fastopen = 1;
|
||||
|
|
@ -302,6 +309,10 @@ outnet_tcp_take_into_use(struct waiting_tcp* w, uint8_t* pkt, size_t pkt_len)
|
|||
#ifdef USE_MSG_FASTOPEN
|
||||
}
|
||||
#endif /* USE_MSG_FASTOPEN */
|
||||
#ifdef USE_OSX_MSG_FASTOPEN
|
||||
}
|
||||
}
|
||||
#endif /* USE_OSX_MSG_FASTOPEN */
|
||||
if(w->outnet->sslctx && w->ssl_upstream) {
|
||||
pend->c->ssl = outgoing_ssl_fd(w->outnet->sslctx, s);
|
||||
if(!pend->c->ssl) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue