]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix to ignore tcp events for closed comm points.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 8 Nov 2022 11:02:48 +0000 (12:02 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 8 Nov 2022 11:02:48 +0000 (12:02 +0100)
doc/Changelog
util/netevent.c

index 32e7ae8ae9f2f3a01c77df0df1cebb265a1e3b9d..8b2cfb7625e44f58a35b74093568f2ca7a00535d 100644 (file)
@@ -1,3 +1,6 @@
+8 November 2022: Wouter
+       - Fix to ignore tcp events for closed comm points.
+
 21 October 2022: George
        - Merge #767 from jonathangray: consistently use IPv4/IPv6 in
          unbound.conf.5.
index c67a49ff84843baecab2f9750578f4c066ccf0d4..09def2e44b31d476a0f86d2d77e037728d56b545 100644 (file)
@@ -2623,6 +2623,9 @@ comm_point_tcp_handle_callback(int fd, short event, void* arg)
        log_assert(c->type == comm_tcp);
        ub_comm_base_now(c->ev->base);
 
+       if(c->fd == -1 || c->fd != fd)
+               return; /* duplicate event, but commpoint closed. */
+
 #ifdef USE_DNSCRYPT
        /* Initialize if this is a dnscrypt socket */
        if(c->tcp_parent) {