From: Matthijs Mekking Date: Tue, 4 May 2021 07:49:14 +0000 (+0200) Subject: No longer need to strcmp for "none" X-Git-Tag: v9.17.13~14^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=636ff1e15cb15db9252bd664a6f051761db824ca;p=thirdparty%2Fbind9.git No longer need to strcmp for "none" When we introduced "dnssec-policy insecure" we could have removed the 'strcmp' check for "none", because if it was set to "none", the 'kasp' variable would have been set to NULL. --- diff --git a/lib/bind9/check.c b/lib/bind9/check.c index ee00d2482ac..464797e8a3d 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -890,6 +890,9 @@ kasp_name_allowed(const cfg_listelt_t *element) { if (strcmp("none", name) == 0) { return (false); } + if (strcmp("insecure", name) == 0) { + return (false); + } if (strcmp("default", name) == 0) { return (false); } diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 5b8f14c3f2d..9553ade3e86 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -20078,8 +20078,7 @@ zone_rekey(dns_zone_t *zone) { /* * Only update DNSKEY TTL if we have a policy. */ - if (kasp != NULL && strcmp(dns_kasp_getname(kasp), "none") != 0) - { + if (kasp != NULL) { ttl = dns_kasp_dnskeyttl(kasp); }