From a405a53d536521e6c93f47485aacd7c1a1ffb29e Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 12 Sep 2000 18:10:24 +0000 Subject: [PATCH] 443. [bug] When loading a master file failed because of an unrecognized RR type name, the error message did not include the file name and line number. [RT #285] --- CHANGES | 5 +++++ lib/dns/master.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 6fdfbbecbe..b7a844a1d1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ + 443. [bug] When loading a master file failed because of an + unrecognized RR type name, the error message + did not include the file name and line number. + [RT #285] + 442. [bug] TSIG signed messages that did not match any view crashed the server. [RT #290] diff --git a/lib/dns/master.c b/lib/dns/master.c index 6fa5a7a25f..5052fdf216 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: master.c,v 1.64 2000/09/05 03:35:17 marka Exp $ */ +/* $Id: master.c,v 1.65 2000/09/12 18:10:24 gson Exp $ */ #include @@ -883,8 +883,16 @@ load(dns_loadctx_t **ctxp) { result = dns_rdatatype_fromtext(&type, &token.value.as_textregion); - if (result != ISC_R_SUCCESS) + if (result != ISC_R_SUCCESS) { + (*callbacks->warn)(callbacks, + "%s: %s:%lu: unknown RR type '%.*s'", + "dns_master_load", + isc_lex_getsourcename(ctx->lex), + isc_lex_getsourceline(ctx->lex), + token.value.as_textregion.length, + token.value.as_textregion.base); goto cleanup; + } /* * If the class specified does not match the zone's class