From: Vladimír Čunát Date: Fri, 31 Mar 2017 16:21:29 +0000 (+0200) Subject: lib/{resolve,zonecut}: review & fix RANK ocurrences X-Git-Tag: v1.3.0~23^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc229e01a636ba57ee3c08ddd79eb83fe9a5090b;p=thirdparty%2Fknot-resolver.git lib/{resolve,zonecut}: review & fix RANK ocurrences --- diff --git a/lib/resolve.c b/lib/resolve.c index 4be42987f..d1757e3a1 100644 --- a/lib/resolve.c +++ b/lib/resolve.c @@ -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); } } diff --git a/lib/resolve.h b/lib/resolve.h index f1e5af6d6..e10ab2424 100644 --- a/lib/resolve.h +++ b/lib/resolve.h @@ -74,12 +74,12 @@ /** - * 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