]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/{resolve,zonecut}: review & fix RANK ocurrences
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 31 Mar 2017 16:21:29 +0000 (18:21 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 31 Mar 2017 16:21:29 +0000 (18:21 +0200)
lib/resolve.c
lib/resolve.h

index 4be42987f5a8323a6e008b4dbd9f0a703016dd33..d1757e3a1e731926e3c4d9a1a3fce0e9e017d05a 100644 (file)
@@ -479,7 +479,7 @@ static int write_extra_ranked_records(const ranked_rr_array_t *arr, knot_pkt_t *
                }
 
                if (rr->type != KNOT_RRTYPE_RRSIG) {
-                       all_sec = all_sec && entry->rank == KR_VLDRANK_SECURE;
+                       all_sec = all_sec && (entry->rank & KR_RANK_SECURE);
                }
        }
 
index f1e5af6d6b0fa7b445b8718cd69a96eb790ca6c0..e10ab2424b514170384ec422f4b1060c11a78eee 100644 (file)
 
 
 /**
- * Cache entry rank.
+ * RRset rank - for cache and ranked_rr_*.
  *
  * @note Be careful about chosen cache rank nominal values.
- * - AUTH must be > than NONAUTH
+ * - AUTH must be > than !AUTH
  * - AUTH INSECURE must be > than AUTH (because it attempted validation)
- * - NONAUTH SECURE must be > than AUTH (because it's valid)
+ * - !AUTH SECURE must be > than AUTH (because it's valid)
  *
  * See also:
  *   https://tools.ietf.org/html/rfc2181#section-5.4.1