]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add comment about cookie sizes
authorMark Andrews <marka@isc.org>
Tue, 24 Nov 2020 13:12:00 +0000 (00:12 +1100)
committerMark Andrews <marka@isc.org>
Thu, 26 Nov 2020 20:48:46 +0000 (20:48 +0000)
lib/dns/rdata/generic/opt_41.c

index e3a83018e5fbefacca3bc0875853ebff1eda8ba5..7dbb3703867310a0b6baff39835d1902b504bf9c 100644 (file)
@@ -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);
                        }