]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
validate: fix a typo leading to lower rank
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 17 May 2017 11:00:33 +0000 (13:00 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 17 May 2017 11:06:10 +0000 (13:06 +0200)
The authority records weren't marked with _INSECURE rank and remained
with a *lower* one.  That could lead to them not being cached,
effectively.

lib/layer/validate.c

index 32d63ff8287141b15df255367a01273bb582e626..9b9b43d24d71976a69e1f8fa27828294784f30c4 100644 (file)
@@ -590,7 +590,7 @@ static void rank_records(kr_layer_t *ctx, uint8_t rank_to_set)
        struct kr_request *req     = ctx->req;
        struct kr_query *qry       = req->current_query;
        ranked_rr_array_t *ptrs[2] = { &req->answ_selected, &req->auth_selected };
-       for (size_t i = 0; i < 1; ++i) {
+       for (size_t i = 0; i < 2; ++i) {
                ranked_rr_array_t *arr = ptrs[i];
                for (size_t j = 0; j < arr->len; ++j) {
                        ranked_rr_array_entry_t *entry = arr->at[j];