- Add an explicit type cast for TCP FASTOPEN fix.

git-svn-id: file:///svn/unbound/trunk@4205 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2017-06-06 07:59:32 +00:00
parent b93fd4e0c9
commit f78e04a12c
2 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,6 @@
6 June 2017: Wouter
- Add an explicit type cast for TCP FASTOPEN fix.
1 June 2017: Ralph 1 June 2017: Ralph
- Fix #1274: automatically trim chroot path from dnscrypt key/cert paths - Fix #1274: automatically trim chroot path from dnscrypt key/cert paths
(from Manu Bretelle). (from Manu Bretelle).

View file

@ -1417,7 +1417,7 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
/* 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() */ * we need to perform connect() */
if(connect(fd, &c->repinfo.addr, c->repinfo.addrlen) == -1) { if(connect(fd, (struct sockaddr *)&c->repinfo.addr, c->repinfo.addrlen) == -1) {
#ifdef EINPROGRESS #ifdef EINPROGRESS
if(errno == EINPROGRESS) if(errno == EINPROGRESS)
return 1; /* wait until connect done*/ return 1; /* wait until connect done*/
@ -1428,7 +1428,7 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
return 1; /* wait until connect done*/ return 1; /* wait until connect done*/
#endif #endif
if(tcp_connect_errno_needs_log( if(tcp_connect_errno_needs_log(
&c->repinfo.addr, c->repinfo.addrlen)) { (struct sockaddr *)&c->repinfo.addr, c->repinfo.addrlen)) {
log_err_addr("outgoing tcp: connect after EPIPE for fastopen", log_err_addr("outgoing tcp: connect after EPIPE for fastopen",
strerror(errno), &c->repinfo.addr, c->repinfo.addrlen); strerror(errno), &c->repinfo.addr, c->repinfo.addrlen);
} }