From: Yorgos Thessalonikefs Date: Mon, 22 Jan 2024 14:53:36 +0000 (+0100) Subject: - Update error printout for duplicate trust anchors to include the X-Git-Tag: release-1.19.3rc1~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe03bacd6c7a05c4df996dc945e5c20dddffbd05;p=thirdparty%2Funbound.git - Update error printout for duplicate trust anchors to include the trust anchor name (relates to #920). --- diff --git a/doc/Changelog b/doc/Changelog index b87d32b9d..c2d770368 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +22 January 2024: Yorgos + - Update error printout for duplicate trust anchors to include the + trust anchor name (relates to #920). + 22 January 2024: Wouter - Fix for #997: Print details for SSL certificate failure. diff --git a/validator/autotrust.c b/validator/autotrust.c index 3011a0ace..3eb13b35c 100644 --- a/validator/autotrust.c +++ b/validator/autotrust.c @@ -353,17 +353,21 @@ autr_tp_create(struct val_anchors* anchors, uint8_t* own, size_t own_len, lock_basic_lock(&anchors->lock); if(!rbtree_insert(anchors->tree, &tp->node)) { + char buf[LDNS_MAX_DOMAINLEN+1]; lock_basic_unlock(&anchors->lock); - log_err("trust anchor presented twice"); + dname_str(tp->name, buf); + log_err("trust anchor for '%s' presented twice", buf); free(tp->name); free(tp->autr); free(tp); return NULL; } if(!rbtree_insert(&anchors->autr->probe, &tp->autr->pnode)) { + char buf[LDNS_MAX_DOMAINLEN+1]; (void)rbtree_delete(anchors->tree, tp); lock_basic_unlock(&anchors->lock); - log_err("trust anchor in probetree twice"); + dname_str(tp->name, buf); + log_err("trust anchor for '%s' in probetree twice", buf); free(tp->name); free(tp->autr); free(tp);