2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Add a answer-cookie named config option

(cherry picked from commit 2930507357)
This commit is contained in:
Mukund Sivaraman
2018-03-19 18:09:05 +05:30
committed by Evan Hunt
parent 5d0b48474f
commit 0ba997b4c2
6 changed files with 12 additions and 3 deletions

View File

@@ -1909,7 +1909,9 @@ process_cookie(ns_client_t *client, isc_buffer_t *buf, size_t optlen) {
/*
* If we have already seen a cookie option skip this cookie option.
*/
if ((client->attributes & NS_CLIENTATTR_WANTCOOKIE) != 0) {
if ((!client->sctx->answercookie) ||
(client->attributes & NS_CLIENTATTR_WANTCOOKIE) != 0)
{
isc_buffer_forward(buf, (unsigned int)optlen);
return;
}