1033. [bug] Don't imply that we support a opcode that we don't
when we don't have a matching view or cannot
determine the class.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
1033. [bug] Don't imply that we support a opcode that we don't
|
||||
when we don't have a matching view or cannot
|
||||
determine the class.
|
||||
|
||||
1032. [func] hostname.bind/txt/chaos now returns the name of
|
||||
the machine hosting the nameserver. This is useful
|
||||
in diagnosing problems with anycast servers.
|
||||
|
||||
+16
-3
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: client.c,v 1.179 2001/10/01 18:53:56 gson Exp $ */
|
||||
/* $Id: client.c,v 1.180 2001/10/09 02:05:55 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1061,6 +1061,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
int match;
|
||||
dns_messageid_t id;
|
||||
unsigned int flags;
|
||||
isc_boolean_t notimp;
|
||||
|
||||
REQUIRE(event != NULL);
|
||||
client = event->ev_arg;
|
||||
@@ -1208,6 +1209,18 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
switch (client->message->opcode) {
|
||||
case dns_opcode_query:
|
||||
case dns_opcode_update:
|
||||
case dns_opcode_notify:
|
||||
notimp = ISC_FALSE;
|
||||
break;
|
||||
case dns_opcode_iquery:
|
||||
default:
|
||||
notimp = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
client->message->rcode = dns_rcode_noerror;
|
||||
|
||||
/*
|
||||
@@ -1261,7 +1274,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
"message class could not be determined");
|
||||
ns_client_dumpmessage(client,
|
||||
"message class could not be determined");
|
||||
ns_client_error(client, DNS_R_FORMERR);
|
||||
ns_client_error(client, notimp ? DNS_R_NOTIMP : DNS_R_FORMERR);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -1310,7 +1323,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
|
||||
"no matching view in class '%s'", classname);
|
||||
ns_client_dumpmessage(client, "no matching view in class");
|
||||
ns_client_error(client, DNS_R_REFUSED);
|
||||
ns_client_error(client, notimp ? DNS_R_NOTIMP : DNS_R_REFUSED);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user