]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
layer/validate: disabled validation of truncated messages
authorKarel Slany <karel.slany@nic.cz>
Mon, 17 Aug 2015 13:58:39 +0000 (15:58 +0200)
committerKarel Slany <karel.slany@nic.cz>
Mon, 17 Aug 2015 13:58:39 +0000 (15:58 +0200)
lib/layer/validate.c

index 30da1af7695e5c176a2154c20c501fe474e12598..225dcf1f049226ab3354d098226b6b036dc32a50 100644 (file)
@@ -329,6 +329,11 @@ static int validate(knot_layer_t *ctx, knot_pkt_t *pkt)
                return ctx->state;
        }
 
+       /* Ignore truncated messages. */
+       if (knot_wire_get_tc(pkt->wire)) {
+               return ctx->state;
+       }
+
        /* Server didn't copy back DO=1, this is okay if it doesn't have DS => insecure.
         * If it has DS, it must be secured, fail it as bogus. */
        if (!knot_pkt_has_dnssec(pkt)) {