]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix the IPv6 address length in compute_cookie. [RT #46538]
authorMark Andrews <marka@isc.org>
Thu, 9 Nov 2017 12:59:20 +0000 (23:59 +1100)
committerMark Andrews <marka@isc.org>
Thu, 9 Nov 2017 12:59:20 +0000 (23:59 +1100)
lib/ns/client.c

index 26e37a06d5ee13875c412c56afe5e9dfca66bb88..af5183c6f7fcd34997ed43eaf09eb100ff9019fc 100644 (file)
@@ -1841,7 +1841,7 @@ compute_cookie(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
                        break;
                case AF_INET6:
                        cp = (unsigned char *)&netaddr.type.in6;
-                       length = 4;
+                       length = 16;
                        break;
                default:
                        INSIST(0);
@@ -1878,7 +1878,7 @@ compute_cookie(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
                        break;
                case AF_INET6:
                        cp = (unsigned char *)&netaddr.type.in6;
-                       length = 4;
+                       length = 16;
                        break;
                default:
                        INSIST(0);