From f78e04a12c73aa850ef21aa80ecfefd166657282 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 6 Jun 2017 07:59:32 +0000 Subject: [PATCH] - Add an explicit type cast for TCP FASTOPEN fix. git-svn-id: file:///svn/unbound/trunk@4205 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 3 +++ util/netevent.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index 7faf7a2fe..55d1c0852 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +6 June 2017: Wouter + - Add an explicit type cast for TCP FASTOPEN fix. + 1 June 2017: Ralph - Fix #1274: automatically trim chroot path from dnscrypt key/cert paths (from Manu Bretelle). diff --git a/util/netevent.c b/util/netevent.c index d3955aae7..6990cdb36 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -1417,7 +1417,7 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) /* fallthrough to nonFASTOPEN * (MSG_FASTOPEN on Linux 3 produces EPIPE) * 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 if(errno == EINPROGRESS) 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*/ #endif 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", strerror(errno), &c->repinfo.addr, c->repinfo.addrlen); } -- 2.47.3