]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Update error printout for duplicate trust anchors to include the
authorYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Mon, 22 Jan 2024 14:53:36 +0000 (15:53 +0100)
committerYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Mon, 22 Jan 2024 14:54:36 +0000 (15:54 +0100)
  trust anchor name (relates to #920).

doc/Changelog
validator/autotrust.c

index b87d32b9d426f82fe5aae2ef01090ceb3a8586d0..c2d770368a448664ad446d57d4394cc2a94e3f5d 100644 (file)
@@ -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.
 
index 3011a0ace7a2c2aee77d4efe76eddd83c1b8ac4c..3eb13b35c2298d98bc1b6719b66fa1716552457c 100644 (file)
@@ -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);