2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Don't allow metatypes to be loaded using the \# format.

This commit is contained in:
Brian Wellington
2000-11-19 22:12:42 +00:00
parent cfd8d65ec1
commit 1275a72e8d
3 changed files with 9 additions and 5 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: result.h,v 1.72 2000/11/15 00:51:16 gson Exp $ */
/* $Id: result.h,v 1.73 2000/11/19 22:12:42 bwelling Exp $ */
#ifndef DNS_RESULT_H
#define DNS_RESULT_H 1
@@ -106,8 +106,9 @@
#define DNS_R_NOTEXACT (ISC_RESULTCLASS_DNS + 67)
#define DNS_R_BLACKHOLED (ISC_RESULTCLASS_DNS + 68)
#define DNS_R_BADALG (ISC_RESULTCLASS_DNS + 69)
#define DNS_R_METATYPE (ISC_RESULTCLASS_DNS + 70)
#define DNS_R_NRESULTS 70 /* Number of results */
#define DNS_R_NRESULTS 71 /* Number of results */
/*
* DNS wire format rcodes.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata.c,v 1.125 2000/11/15 19:11:34 gson Exp $ */
/* $Id: rdata.c,v 1.126 2000/11/19 22:12:39 bwelling Exp $ */
#include <config.h>
#include <ctype.h>
@@ -601,6 +601,8 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
if (result == ISC_R_SUCCESS)
result = isc_hex_tobuffer(lexer, target,
token.value.as_ulong);
if (result == ISC_R_SUCCESS && dns_rdatatype_ismeta(type))
result = DNS_R_METATYPE;
if (result == ISC_R_SUCCESS && dns_rdatatype_isknown(type))
result = rdata_valid(target, rdclass, type, mctx);
} else {

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: result.c,v 1.78 2000/11/15 00:51:17 gson Exp $ */
/* $Id: result.c,v 1.79 2000/11/19 22:12:41 bwelling Exp $ */
#include <config.h>
@@ -108,7 +108,8 @@ static const char *text[DNS_R_NRESULTS] = {
"seen include file", /* 66 DNS_R_SEENINCLUDE */
"not exact", /* 67 DNS_R_NOTEXACT */
"address blackholed", /* 68 DNS_R_BLACKHOLED */
"bad algorithm" /* 69 DNS_R_BADALG */
"bad algorithm", /* 69 DNS_R_BADALG */
"invalid use of a meta type" /* 70 DNS_R_METATYPE */
};
static const char *rcode_text[DNS_R_NRCODERESULTS] = {