]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
Reserving space for cookies also if only server cookie functionality enabled.
authorKarel Slany <karel.slany@nic.cz>
Fri, 22 Jul 2016 12:27:25 +0000 (14:27 +0200)
committerOndřej Surý <ondrej@sury.org>
Thu, 11 Aug 2016 12:06:45 +0000 (14:06 +0200)
lib/resolve.c

index d974452f8d924ef7ea6955a900e7fd72e77ca26c..ace257e2edf52a7066472fe7c8812542d08ff4cd 100644 (file)
@@ -273,7 +273,8 @@ static int edns_create(knot_pkt_t *pkt, knot_pkt_t *template, struct kr_request
        pkt->opt_rr = knot_rrset_copy(req->ctx->opt_rr, &pkt->mm);
        size_t wire_size = knot_edns_wire_size(pkt->opt_rr);
 #if defined(ENABLE_COOKIES)
-       if (req->ctx->cookie_ctx.clnt.enabled) {
+       if (req->ctx->cookie_ctx.clnt.enabled ||
+           req->ctx->cookie_ctx.srvr.enabled) {
                wire_size += KR_COOKIE_OPT_MAX_LEN;
        }
 #endif /* defined(ENABLE_COOKIES) */