]> 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 23:20:40 +0000 (10:20 +1100)
(cherry picked from commit 304df539919beb5da6d33d8690b5e588476308d8)

lib/dns/rdata/generic/opt_41.c

index 36ae6abe76171db7cf0d556e9445a17a84bf7d6b..40fcbe7885689f91eb14900eddcbbacedc517e81 100644 (file)
@@ -193,6 +193,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);
                        }