]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/cache: fixed incorrect ranking in some places
authorMarek Vavrusa <marek@vavrusa.com>
Fri, 1 Jul 2016 17:47:11 +0000 (10:47 -0700)
committerMarek Vavrusa <marek@vavrusa.com>
Fri, 1 Jul 2016 17:47:11 +0000 (10:47 -0700)
fixed incorrect tagging in rrmap where secure rank would overflow

found by @gdemidov

lib/cache.h

index d7f80db3ae50a2201343a35bf5378deef5f47c38..b5cddc772489482b59f43f9b0f4ae34491001fa7 100644 (file)
@@ -40,16 +40,16 @@ enum kr_cache_rank {
        KR_RANK_INSECURE  = 1,  /* Entry is DNSSEC insecure (e.g. RRSIG not exists). */
        KR_RANK_NONAUTH   = 8,  /* Entry from authority section (i.e. parent-side) */
        KR_RANK_AUTH      = 16, /* Entry from answer (authoritative data) */
-       KR_RANK_SECURE    = 64, /* Entry is DNSSEC valid (e.g. RRSIG exists). */
+       KR_RANK_SECURE    = 32, /* Entry is DNSSEC valid (e.g. RRSIG exists). */
        /* @note Rank must not exceed 6 bits */
 };
 
 /** Cache entry flags */
 enum kr_cache_flag {
-       KR_CACHE_FLAG_NONE        = 0,
-       KR_CACHE_FLAG_WCARD_PROOF = 1  /* Entry contains either packet with wildcard
-                                        * answer either record for which wildcard
-                                        * expansion proof is needed */
+       KR_CACHE_FLAG_NONE            = 0,
+       KR_CACHE_FLAG_WCARD_PROOF = 1, /* Entry contains either packet with wildcard
+                                       * answer either record for which wildcard
+                                       * expansion proof is needed */
 };