]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix verbose printout failure in tcp reuse unit test.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 2 Aug 2021 14:06:36 +0000 (16:06 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 2 Aug 2021 14:06:36 +0000 (16:06 +0200)
doc/Changelog
services/outside_network.c

index 6ec117b30083640a6fd4a99b9b853bc244f8debf..9d002be114f0153068fef376e1082a47bd29e5b2 100644 (file)
@@ -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
index 73cb4ff329bbc3140af7d59fcf247d8de741bd40..a3f982e72185d406d23309418711b8c06e16e8e9 100644 (file)
@@ -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,