From: W.C.A. Wijngaards Date: Fri, 5 Mar 2021 12:54:26 +0000 (+0100) Subject: - Debug output for #411 and #439: printout internal error and details. X-Git-Tag: release-1.13.2rc1~246 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=269c168f7e58dc3a18ff0148fd8cce959f71bad7;p=thirdparty%2Funbound.git - Debug output for #411 and #439: printout internal error and details. --- diff --git a/doc/Changelog b/doc/Changelog index d8f88f88c..3b3073405 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 5 March 2021: Wouter - Workaround for #439: prevent loops in the reuse rbtree. + - Debug output for #411 and #439: printout internal error and details. 4 March 2021: Wouter - iana portlist update. diff --git a/services/outside_network.c b/services/outside_network.c index d2d8c56f5..9769b7602 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -890,7 +890,13 @@ reuse_tcp_remove_tree_list(struct outside_network* outnet, verbose(VERB_CLIENT, "reuse_tcp_remove_tree_list"); if(reuse->node.key) { /* delete it from reuse tree */ - (void)rbtree_delete(&outnet->tcp_reuse, reuse); + if(!rbtree_delete(&outnet->tcp_reuse, reuse)) { + /* should not be possible, it should be there */ + char buf[256]; + addr_to_str(&reuse->addr, reuse->addrlen, buf, + sizeof(buf)); + log_err("reuse tcp delete: node not present, internal error, %s ssl %d lru %d", buf, reuse->is_ssl, reuse->item_on_lru_list); + } reuse->node.key = NULL; /* defend against loops on broken tree by zeroing the * rbnode structure */