]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
cache: skip NSEC stype, instead of failing assertion
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 25 Jan 2018 17:48:24 +0000 (18:48 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 25 Jan 2018 17:48:24 +0000 (18:48 +0100)
lib/cache.c

index f85b48ea866024209943a3de20dc61435b03d463..d74579d038739f761e89697b23b8202e2f908aef 100644 (file)
@@ -332,6 +332,10 @@ static int cache_peek_real(kr_layer_t *ctx, knot_pkt_t *pkt)
        qry->flags.NO_CACHE = true;
 
        struct key k_storage, *k = &k_storage;
+       if (qry->stype == KNOT_RRTYPE_NSEC) {
+               VERBOSE_MSG(qry, "=> skipping stype NSEC\n");
+               return ctx->state;
+       }
        if (!check_dname_for_lf(qry->sname)) {
                WITH_VERBOSE(qry) {
                        auto_free char *sname_str = kr_dname_text(qry->sname);