2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

1023. [func] Accept hints without TTLs.

This commit is contained in:
Mark Andrews
2001-09-30 04:31:28 +00:00
parent 54c4aa0f62
commit 96ea98af24
4 changed files with 17 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
1023. [func] Accept hints without TTLs.
1022. [bug] Allow hints to be completely empty. [RT #1802]
1021 [bug] Win32 timestamp was one month later than it should

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.h,v 1.32 2001/09/04 00:35:19 marka Exp $ */
/* $Id: master.h,v 1.33 2001/09/30 04:31:28 marka Exp $ */
#ifndef DNS_MASTER_H
#define DNS_MASTER_H 1
@@ -37,6 +37,7 @@
#define DNS_MASTER_MANYERRORS 0x00000002 /* Continue processing on errors. */
#define DNS_MASTER_NOINCLUDE 0x00000004 /* Disallow $INCLUDE directives. */
#define DNS_MASTER_ZONE 0x00000008 /* Loading a zone master file. */
#define DNS_MASTER_HINT 0x00000010 /* Loading a hint master file. */
ISC_LANG_BEGINDECLS

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.c,v 1.126 2001/09/11 05:09:41 marka Exp $ */
/* $Id: master.c,v 1.127 2001/09/30 04:31:26 marka Exp $ */
#include <config.h>
@@ -1449,6 +1449,13 @@ load(dns_loadctx_t *lctx) {
limit_ttl(callbacks, source, line, &lctx->ttl);
lctx->default_ttl = lctx->ttl;
lctx->default_ttl_known = ISC_TRUE;
} else if ((lctx->options & DNS_MASTER_HINT) != 0) {
/*
* Zero TTL's are fine for hints.
*/
lctx->ttl = 0;
lctx->default_ttl = lctx->ttl;
lctx->default_ttl_known = ISC_TRUE;
} else {
(*callbacks->warn)(callbacks,
"%s:%lu: no TTL specified; "

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rootns.c,v 1.21 2001/09/30 03:02:47 marka Exp $ */
/* $Id: rootns.c,v 1.22 2001/09/30 04:31:27 marka Exp $ */
#include <config.h>
@@ -215,14 +215,16 @@ dns_rootns_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
* Load the hints from the specified filename.
*/
result = dns_master_loadfile(filename, &db->origin,
&db->origin, db->rdclass, 0,
&db->origin, db->rdclass,
DNS_MASTER_HINT,
&callbacks, db->mctx);
} else if (rdclass == dns_rdataclass_in) {
/*
* Default to using the Internet root servers.
*/
result = dns_master_loadbuffer(&source, &db->origin,
&db->origin, db->rdclass, 0,
&db->origin, db->rdclass,
DNS_MASTER_HINT,
&callbacks, db->mctx);
} else
result = ISC_R_NOTFOUND;