From: George Thessalonikefs Date: Fri, 23 Jul 2021 16:00:24 +0000 (+0200) Subject: - Fix for #411, #439, #469: stream reuse, fix LRU list when reuse is X-Git-Tag: release-1.13.2rc1~19^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=224571256d6e826d3a3609e37e0bab4137288acd;p=thirdparty%2Funbound.git - Fix for #411, #439, #469: stream reuse, fix LRU list when reuse is already in the tree. --- diff --git a/services/outside_network.c b/services/outside_network.c index 8b8deea91..1867893c7 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -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;