From: Karel Slany Date: Fri, 22 Jul 2016 12:27:25 +0000 (+0200) Subject: Reserving space for cookies also if only server cookie functionality enabled. X-Git-Tag: v1.1.0~2^2~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e0c0c32cf0f6ee11cf24bce399dcd4f692e8e63;p=thirdparty%2Fknot-resolver.git Reserving space for cookies also if only server cookie functionality enabled. --- diff --git a/lib/resolve.c b/lib/resolve.c index d974452f8..ace257e2e 100644 --- a/lib/resolve.c +++ b/lib/resolve.c @@ -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) */