]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
if UDP and we have a bad cookie send a immediate badcookie response
authorMark Andrews <marka@isc.org>
Mon, 27 Jul 2015 05:42:03 +0000 (15:42 +1000)
committerMark Andrews <marka@isc.org>
Mon, 27 Jul 2015 05:42:03 +0000 (15:42 +1000)
bin/named/query.c

index 98cc9a867718e9cdae7c7d62f774fc5084f904a7..1a90351d4ed0bf5046aef5483509b8459fe03fa0 100644 (file)
@@ -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) &&