summaryrefslogtreecommitdiff
path: root/lib/dns/master.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/master.c')
-rw-r--r--lib/dns/master.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/dns/master.c b/lib/dns/master.c
index 1fde70c3b6ec..4dba0d7c5558 100644
--- a/lib/dns/master.c
+++ b/lib/dns/master.c
@@ -280,7 +280,7 @@ loadctx_destroy(dns_loadctx_t *lctx);
SETRESULT(lctx, result); \
LOGIT(result); \
read_till_eol = ISC_TRUE; \
- continue; \
+ break; \
} else if (result != ISC_R_SUCCESS) \
goto log_and_cleanup; \
} \
@@ -352,7 +352,6 @@ static const dns_name_t ip6_arpa =
{NULL, NULL}
};
-
static inline isc_result_t
gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token,
isc_boolean_t eol, dns_rdatacallbacks_t *callbacks)
@@ -860,8 +859,6 @@ generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
goto insist_cleanup;
}
- ISC_LIST_INIT(rdatalist.rdata);
- ISC_LINK_INIT(&rdatalist, link);
for (i = start; i <= stop; i += step) {
result = genname(lhs, i, lhsbuf, DNS_MASTER_LHS);
if (result != ISC_R_SUCCESS)
@@ -911,8 +908,8 @@ generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
if (result != ISC_R_SUCCESS)
goto error_cleanup;
+ dns_rdatalist_init(&rdatalist);
rdatalist.type = type;
- rdatalist.covers = 0;
rdatalist.rdclass = lctx->zclass;
rdatalist.ttl = lctx->ttl;
ISC_LIST_PREPEND(head, &rdatalist, link);
@@ -1793,6 +1790,7 @@ load_text(dns_loadctx_t *lctx) {
}
}
if (type == dns_rdatatype_ptr &&
+ !dns_name_isdnssd(name) &&
(dns_name_issubdomain(name, &in_addr_arpa) ||
dns_name_issubdomain(name, &ip6_arpa) ||
dns_name_issubdomain(name, &ip6_int)))
@@ -1950,11 +1948,11 @@ load_text(dns_loadctx_t *lctx) {
rdatalist_size += RDLSZ;
}
this = &rdatalist[rdlcount++];
+ dns_rdatalist_init(this);
this->type = type;
this->covers = covers;
this->rdclass = lctx->zclass;
this->ttl = lctx->ttl;
- ISC_LIST_INIT(this->rdata);
if (ictx->glue != NULL)
ISC_LIST_INITANDPREPEND(glue_list, this, link);
else
@@ -2200,7 +2198,6 @@ load_raw(dns_loadctx_t *lctx) {
ISC_LIST_INIT(head);
ISC_LIST_INIT(dummy);
- dns_rdatalist_init(&rdatalist);
/*
* Allocate target_size of buffer space. This is greater than twice
@@ -2291,6 +2288,7 @@ load_raw(dns_loadctx_t *lctx) {
isc_buffer_add(&target, (unsigned int)readlen);
/* Construct RRset headers */
+ dns_rdatalist_init(&rdatalist);
rdatalist.rdclass = isc_buffer_getuint16(&target);
rdatalist.type = isc_buffer_getuint16(&target);
rdatalist.covers = isc_buffer_getuint16(&target);