From: Mark Andrews Date: Tue, 24 Nov 2020 13:12:00 +0000 (+1100) Subject: Add comment about cookie sizes X-Git-Tag: v9.17.8~20^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=304df539919beb5da6d33d8690b5e588476308d8;p=thirdparty%2Fbind9.git Add comment about cookie sizes --- diff --git a/lib/dns/rdata/generic/opt_41.c b/lib/dns/rdata/generic/opt_41.c index e3a83018e5f..7dbb3703867 100644 --- a/lib/dns/rdata/generic/opt_41.c +++ b/lib/dns/rdata/generic/opt_41.c @@ -197,6 +197,10 @@ fromwire_opt(ARGS_FROMWIRE) { isc_region_consume(&sregion, length); break; case DNS_OPT_COOKIE: + /* + * Client cookie alone has length 8. + * Client + server cookie is 8 + [8..32]. + */ if (length != 8 && (length < 16 || length > 40)) { return (DNS_R_OPTERR); }