]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix for #411, #439, #469: stream reuse, fix LRU list when reuse is
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Fri, 23 Jul 2021 16:00:24 +0000 (18:00 +0200)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Fri, 23 Jul 2021 16:00:24 +0000 (18:00 +0200)
  already in the tree.

services/outside_network.c

index 8b8deea91d3669c12a2801add800d60dd39fc766..1867893c76e167d5a4a5b1f753d4861016d79d0a 100644 (file)
@@ -467,10 +467,10 @@ reuse_tcp_insert(struct outside_network* outnet, struct pending_tcp* pend_tcp)
        pend_tcp->reuse.node.key = &pend_tcp->reuse;
        pend_tcp->reuse.pending = pend_tcp;
        if(!rbtree_insert(&outnet->tcp_reuse, &pend_tcp->reuse.node)) {
-               /* this is a duplicate connection, close this one */
+               /* We are not in the LRU list but we are already in the
+                * tcp_reuse tree, strange.
+                * Continue to add ourselves to the LRU list. */
                verbose(VERB_CLIENT, "reuse_tcp_insert: duplicate connection");
-               pend_tcp->reuse.node.key = NULL;
-               return 0;
        }
        /* insert into LRU, first is newest */
        pend_tcp->reuse.lru_prev = NULL;