From: Mark Andrews Date: Mon, 27 Jul 2015 05:42:03 +0000 (+1000) Subject: if UDP and we have a bad cookie send a immediate badcookie response X-Git-Tag: v9.11.0a1~626 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b485d0a67f77e3bdb0f99014f50b4facc1e61784;p=thirdparty%2Fbind9.git if UDP and we have a bad cookie send a immediate badcookie response --- diff --git a/bin/named/query.c b/bin/named/query.c index 98cc9a86771..1a90351d4ed 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -6973,15 +6973,9 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) goto cleanup; } } -#ifdef __notyet__ - /* - * XXXMPA Wait until BADCOOKIE is officially allocated. - * Policy knob? - */ - } else if (WANTCOOKIE(client) && !HAVECOOKIE(client)) { + } else if (!TCP(client) && WANTCOOKIE(client) && !HAVECOOKIE(client)) { client->message->rcode = dns_rcode_badcookie; goto cleanup; -#endif } if (!RECURSING(client) &&