From: W.C.A. Wijngaards Date: Mon, 2 Aug 2021 14:06:36 +0000 (+0200) Subject: - Fix verbose printout failure in tcp reuse unit test. X-Git-Tag: release-1.13.2rc1~16^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ed5b62578809b5d891045b1cb9b5196d0f86a92;p=thirdparty%2Funbound.git - Fix verbose printout failure in tcp reuse unit test. --- diff --git a/doc/Changelog b/doc/Changelog index 6ec117b30..9d002be11 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,7 @@ - Move RSA and DSA to use OpenSSL 3.0.0 API. - Move ECDSA functions to use OpenSSL 3.0.0 API. - iana portlist update. + - Fix verbose printout failure in tcp reuse unit test. 30 July 2021: Wouter - Fix #515: Compilation against openssl 3.0.0 beta2 is failing to diff --git a/services/outside_network.c b/services/outside_network.c index 73cb4ff32..a3f982e72 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -347,6 +347,8 @@ log_reuse_tcp(enum verbosity_value v, const char* msg, struct reuse_tcp* reuse) uint16_t port; char addrbuf[128]; if(verbosity < v) return; + if(!reuse || !reuse->pending || !reuse->pending->c) + return; addr_to_str(&reuse->addr, reuse->addrlen, addrbuf, sizeof(addrbuf)); port = ntohs(((struct sockaddr_in*)&reuse->addr)->sin_port); verbose(v, "%s %s#%u fd %d", msg, addrbuf, (unsigned)port,