diff --git a/CHANGES b/CHANGES index 110572dcdc..98b5d814a2 100644 --- a/CHANGES +++ b/CHANGES @@ -2,7 +2,8 @@ 1594. [placeholder] rt10565 -1593. [placeholder] rt10642 +1593. [bug] rndc should return "unknown command" to unknown + commands. [RT# 10642] 1592. [bug] configure_view() could leak a dispatch. [RT# 10675] diff --git a/bin/named/control.c b/bin/named/control.c index ff1d8a198a..e951238bdd 100644 --- a/bin/named/control.c +++ b/bin/named/control.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: control.c,v 1.19 2004/03/05 04:57:46 marka Exp $ */ +/* $Id: control.c,v 1.20 2004/03/22 01:46:00 marka Exp $ */ #include @@ -27,6 +27,8 @@ #include #include +#include + #include #include #include @@ -134,7 +136,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) { NS_LOGMODULE_CONTROL, ISC_LOG_WARNING, "unknown control channel command '%s'", command); - result = ISC_R_NOTIMPLEMENTED; + result = DNS_R_UNKNOWNCOMMAND; } return (result); diff --git a/lib/dns/include/dns/result.h b/lib/dns/include/dns/result.h index 6f2b340297..27e94f4545 100644 --- a/lib/dns/include/dns/result.h +++ b/lib/dns/include/dns/result.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.h,v 1.103 2004/03/05 05:09:46 marka Exp $ */ +/* $Id: result.h,v 1.104 2004/03/22 01:46:01 marka Exp $ */ #ifndef DNS_RESULT_H #define DNS_RESULT_H 1 @@ -140,8 +140,9 @@ #define DNS_R_BADOWNERNAME (ISC_RESULTCLASS_DNS + 96) #define DNS_R_BADNAME (ISC_RESULTCLASS_DNS + 97) #define DNS_R_DYNAMIC (ISC_RESULTCLASS_DNS + 98) +#define DNS_R_UNKNOWNCOMMAND (ISC_RESULTCLASS_DNS + 99) -#define DNS_R_NRESULTS 99 /* Number of results */ +#define DNS_R_NRESULTS 100 /* Number of results */ /* * DNS wire format rcodes. diff --git a/lib/dns/result.c b/lib/dns/result.c index 1e5ba43adc..685d29da39 100644 --- a/lib/dns/result.c +++ b/lib/dns/result.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.c,v 1.114 2004/03/05 05:09:24 marka Exp $ */ +/* $Id: result.c,v 1.115 2004/03/22 01:46:01 marka Exp $ */ #include @@ -147,7 +147,8 @@ static const char *text[DNS_R_NRESULTS] = { "from wildcard", /* 95 DNS_R_FROMWILDCARD */ "bad owner name (check-names)", /* 96 DNS_R_BADOWNERNAME */ "bad name (check-names)", /* 97 DNS_R_BADNAME */ - "dynamic zone" /* 98 DNS_R_DYNAMIC */ + "dynamic zone", /* 98 DNS_R_DYNAMIC */ + "unknown command" /* 99 DNS_R_UNKNOWNCOMMAND */ }; static const char *rcode_text[DNS_R_NRCODERESULTS] = {