]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Crash in cache code when compiled with HAVE_DNSSEC.
authorSimon Kelley <simon@thekelleys.org.uk>
Tue, 28 Jan 2014 14:54:46 +0000 (14:54 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Tue, 28 Jan 2014 14:54:46 +0000 (14:54 +0000)
src/cache.c

index 01fee3f299bb6b00122522b1f26134df17e4caad..019f5bbbf92d33793f2e37de8a137e3b65e085ff 100644 (file)
@@ -345,7 +345,8 @@ static int cache_scan_free(char *name, struct all_addr *addr, time_t now, unsign
 #ifdef HAVE_DNSSEC
              /* Deletion has to be class-sensitive for DS, DNSKEY, RRSIG, also 
                 type-covered sensitive for  RRSIG */
-             if ((flags & (F_DNSKEY | F_DS)) == (crecp->flags & (F_DNSKEY | F_DS)) &&
+             if ((flags & (F_DNSKEY | F_DS)) &&
+                 (flags & (F_DNSKEY | F_DS)) == (crecp->flags & (F_DNSKEY | F_DS)) &&
                  crecp->uid == addr->addr.dnssec.class &&
                  (!((flags & (F_DS | F_DNSKEY)) == (F_DS | F_DNSKEY)) || 
                   crecp->addr.sig.type_covered == addr->addr.dnssec.type))