From: W.C.A. Wijngaards Date: Fri, 12 Feb 2021 08:16:22 +0000 (+0100) Subject: zonemd, review comments, fix no anchor lookup if none. X-Git-Tag: release-1.13.2rc1~269^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7ffa6618c90037bbd5b8ef1f58e13cda454b0b1;p=thirdparty%2Funbound.git zonemd, review comments, fix no anchor lookup if none. --- diff --git a/services/authzone.c b/services/authzone.c index 60a05d4bb..9818ab344 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -8214,7 +8214,9 @@ void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env, /* else, find chain of trust by fetching DNSKEYs lookup for zone */ /* result if that, if insecure, means no DNSSEC for the ZONEMD, * otherwise we have the zone DNSKEY for the DNSSEC verification. */ - anchor = anchors_lookup(env->anchors, z->name, z->namelen, z->dclass); + if(env->anchors) + anchor = anchors_lookup(env->anchors, z->name, z->namelen, + z->dclass); if(anchor && query_dname_compare(z->name, anchor->name) == 0) { if(only_online) { lock_basic_unlock(&anchor->lock);