mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
655. [bug] Improve error reporting on unexpected eof when loading
zones. [RT #611]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
655. [bug] Improve error reporting on unexpected eof when loading
|
||||||
|
zones. [RT #611]
|
||||||
|
|
||||||
654. [bug] Origin was being forgotten in TCP retries in dig.
|
654. [bug] Origin was being forgotten in TCP retries in dig.
|
||||||
[RT574]
|
[RT574]
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: master.c,v 1.89 2000/12/28 02:31:20 marka Exp $ */
|
/* $Id: master.c,v 1.90 2001/01/04 23:43:53 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -247,10 +247,13 @@ gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token,
|
|||||||
case ISC_R_NOMEMORY:
|
case ISC_R_NOMEMORY:
|
||||||
return (ISC_R_NOMEMORY);
|
return (ISC_R_NOMEMORY);
|
||||||
default:
|
default:
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
(*callbacks->error)(callbacks,
|
||||||
|
"dns_master_load: %s:%lu:"
|
||||||
" isc_lex_gettoken() failed: %s",
|
" isc_lex_gettoken() failed: %s",
|
||||||
|
isc_lex_getsourcename(lex),
|
||||||
|
isc_lex_getsourceline(lex),
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
return (ISC_R_UNEXPECTED);
|
return (result);
|
||||||
}
|
}
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
}
|
}
|
||||||
@@ -1896,7 +1899,7 @@ commit(dns_rdatacallbacks_t *callbacks, isc_lex_t *lex,
|
|||||||
"ignoring out-of-zone data",
|
"ignoring out-of-zone data",
|
||||||
"dns_master_load",
|
"dns_master_load",
|
||||||
isc_lex_getsourcename(lex),
|
isc_lex_getsourcename(lex),
|
||||||
isc_lex_getsourceline(lex));
|
isc_lex_getsourceline(lex) - 1);
|
||||||
ignore = ISC_TRUE;
|
ignore = ISC_TRUE;
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: rdata.c,v 1.138 2001/01/02 04:24:52 gson Exp $ */
|
/* $Id: rdata.c,v 1.139 2001/01/04 23:43:52 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -626,7 +626,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||||||
char *name;
|
char *name;
|
||||||
unsigned long line;
|
unsigned long line;
|
||||||
void (*callback)(dns_rdatacallbacks_t *, const char *, ...);
|
void (*callback)(dns_rdatacallbacks_t *, const char *, ...);
|
||||||
isc_result_t iresult;
|
isc_result_t tresult;
|
||||||
|
|
||||||
REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE);
|
REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE);
|
||||||
if (rdata != NULL) {
|
if (rdata != NULL) {
|
||||||
@@ -663,24 +663,10 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||||||
do {
|
do {
|
||||||
name = isc_lex_getsourcename(lexer);
|
name = isc_lex_getsourcename(lexer);
|
||||||
line = isc_lex_getsourceline(lexer);
|
line = isc_lex_getsourceline(lexer);
|
||||||
iresult = isc_lex_gettoken(lexer, options, &token);
|
tresult = isc_lex_gettoken(lexer, options, &token);
|
||||||
if (iresult != ISC_R_SUCCESS) {
|
if (tresult != ISC_R_SUCCESS) {
|
||||||
if (result == ISC_R_SUCCESS) {
|
if (result == ISC_R_SUCCESS)
|
||||||
switch (iresult) {
|
result = tresult;
|
||||||
case ISC_R_NOMEMORY:
|
|
||||||
result = ISC_R_NOMEMORY;
|
|
||||||
break;
|
|
||||||
case ISC_R_NOSPACE:
|
|
||||||
result = ISC_R_NOSPACE;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
|
||||||
"isc_lex_gettoken() failed: %s",
|
|
||||||
isc_result_totext(iresult));
|
|
||||||
result = ISC_R_UNEXPECTED;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (callback != NULL)
|
if (callback != NULL)
|
||||||
fromtext_error(callback, callbacks, name,
|
fromtext_error(callback, callbacks, name,
|
||||||
line, NULL, result);
|
line, NULL, result);
|
||||||
|
Reference in New Issue
Block a user