]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
No longer need to strcmp for "none"
authorMatthijs Mekking <matthijs@isc.org>
Tue, 4 May 2021 07:49:14 +0000 (09:49 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 5 May 2021 09:23:53 +0000 (11:23 +0200)
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.

lib/bind9/check.c
lib/dns/zone.c

index ee00d2482acbd48d4ba9809236f9128ec2494ae9..464797e8a3dbf371bfc192be8f42bc279e7d82cf 100644 (file)
@@ -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);
        }
index 5b8f14c3f2da75d42784a5bde8e3646c387ab29a..9553ade3e86602d37e2e462bd1bf249b511db633 100644 (file)
@@ -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);
                }