1159. [bug] MD and MF are not permitted to be loaded by RFC1123.

This commit is contained in:
Mark Andrews 2003-08-12 05:09:36 +00:00
parent 33b82c3a70
commit d5f5d596ac
2 changed files with 25 additions and 1 deletions

View file

@ -1,3 +1,5 @@
1159. [bug] MD and MF are not permitted to be loaded by RFC1123.
1158. [func] Report the client's address when logging notify
messages.

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.c,v 1.122.2.8.2.2 2003/08/11 05:28:15 marka Exp $ */
/* $Id: master.c,v 1.122.2.8.2.3 2003/08/12 05:09:36 marka Exp $ */
#include <config.h>
@ -1384,6 +1384,28 @@ load(dns_loadctx_t *lctx) {
if (type == dns_rdatatype_ns && ictx->glue == NULL)
current_has_delegation = ISC_TRUE;
/*
* RFC 1123: MD and MF are not allowed to be loaded from
* master files.
*/
if ((lctx->options & DNS_MASTER_ZONE) != 0 &&
(type == dns_rdatatype_md || type == dns_rdatatype_mf)) {
char typename[DNS_RDATATYPE_FORMATSIZE];
result = DNS_R_OBSOLETE;
dns_rdatatype_format(type, typename, sizeof(typename));
(*callbacks->error)(callbacks,
"%s: %s:%lu: %s '%s': %s",
"dns_master_load", source, line,
"type", typename,
dns_result_totext(result));
if (MANYERRS(lctx, result)) {
SETRESULT(lctx, result);
} else
goto insist_and_cleanup;
}
/*
* Find a rdata structure.
*/