]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib: fixed AD=1 bit never set
authorMarek Vavruša <marek.vavrusa@nic.cz>
Thu, 13 Aug 2015 17:37:16 +0000 (19:37 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Thu, 13 Aug 2015 17:37:16 +0000 (19:37 +0200)
lib/resolve.c

index 1aa3282844208ec6a4a2c2ec45147d4914e7a96b..f67d36a11226f4f50d27488a8a96c887de720e6f 100644 (file)
@@ -253,7 +253,10 @@ static int answer_finalize(struct kr_request *request, int state)
        knot_pkt_t *answer = request->answer;
        knot_pkt_begin(answer, KNOT_ADDITIONAL);
        if (answer->opt_rr) {
-               return edns_put(answer);
+               int ret = edns_put(answer);
+               if (ret != 0) {
+                       return ret;
+               }
        }
        /* Set AD=1 if succeeded and requested secured answer. */
        if (state == KNOT_STATE_DONE && (request->options & QUERY_DNSSEC_WANT)) {