2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

Wildcard NS records are not conceptually allowed by RFC 103[45].

This commit is contained in:
Mark Andrews 2000-06-09 06:03:47 +00:00
parent ce1b0e505e
commit bcff319811
3 changed files with 8 additions and 2 deletions

View File

@ -40,7 +40,7 @@
#define DNS_R_BITSTRINGTOOLONG (ISC_RESULTCLASS_DNS + 3)
#define DNS_R_EMPTYLABEL (ISC_RESULTCLASS_DNS + 4)
#define DNS_R_BADDOTTEDQUAD (ISC_RESULTCLASS_DNS + 5)
/* 6 is unused */
#define DNS_R_INVALIDNS (ISC_RESULTCLASS_DNS + 6)
#define DNS_R_UNKNOWN (ISC_RESULTCLASS_DNS + 7)
#define DNS_R_BADLABELTYPE (ISC_RESULTCLASS_DNS + 8)
#define DNS_R_BADPOINTER (ISC_RESULTCLASS_DNS + 9)

View File

@ -3585,6 +3585,12 @@ loading_addrdataset(void *arg, dns_name_t *name, dns_rdataset_t *rdataset) {
*/
if (dns_name_iswildcard(name)) {
/*
* NS record owners cannot legally be wild cards.
*/
if (rdataset->type == dns_rdatatype_ns)
return (DNS_R_INVALIDNS);
/*
* In order for wildcard matching to work correctly in
* zone_find(), we must ensure that a node for the wildcarding

View File

@ -30,7 +30,7 @@ static const char *text[DNS_R_NRESULTS] = {
"bitstring too long", /* 3 */
"empty label", /* 4 */
"bad dotted quad", /* 5 */
"UNUSED6", /* 6 */
"invalid NS owner name (wildcard)", /* 6 */
"unknown class/type", /* 7 */
"bad label type", /* 8 */
"bad compression pointer", /* 9 */