/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: check-tool.c,v 1.10.18.19 2008/10/24 00:38:02 marka Exp $ */
+/* $Id: check-tool.c,v 1.10.18.20 2008/10/24 01:43:17 tbox Exp $ */
/*! \file */
result = (r); \
if (result != ISC_R_SUCCESS) \
goto cleanup; \
- } while (0)
+ } while (0)
static const char *dbtype[] = { "rbt" };
isc_boolean_t dochecksrv = ISC_FALSE;
isc_boolean_t docheckns = ISC_FALSE;
#endif
-unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
+unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_CHECKMX |
DNS_ZONEOPT_MANYERRORS |
DNS_ZONEOPT_CHECKNAMES |
if (dns_name_countlabels(name) > 1U)
strcat(namebuf, ".");
dns_name_format(owner, ownerbuf, sizeof(ownerbuf));
-
+
result = getaddrinfo(namebuf, NULL, &hints, &ai);
dns_name_format(name, namebuf, sizeof(namebuf) - 1);
switch (result) {
if (dns_name_countlabels(name) > 1U)
strcat(namebuf, ".");
dns_name_format(owner, ownerbuf, sizeof(ownerbuf));
-
+
result = getaddrinfo(namebuf, NULL, &hints, &ai);
dns_name_format(name, namebuf, sizeof(namebuf) - 1);
switch (result) {
if (dns_name_countlabels(name) > 1U)
strcat(namebuf, ".");
dns_name_format(owner, ownerbuf, sizeof(ownerbuf));
-
+
result = getaddrinfo(namebuf, NULL, &hints, &ai);
dns_name_format(name, namebuf, sizeof(namebuf) - 1);
switch (result) {
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.410.18.54 2008/10/24 00:38:01 marka Exp $ */
+/* $Id: zone.c,v 1.410.18.55 2008/10/24 01:43:17 tbox Exp $ */
/*! \file */
isc_result_t result = ISC_R_SUCCESS;
void *mem;
char **tmp, *tmp2;
-
+
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(argv != NULL && *argv == NULL);
-
+
LOCK_ZONE(zone);
size = (zone->db_argc + 1) * sizeof(char *);
for (i = 0; i < zone->db_argc; i++)
dns_zone_setacache(dns_zone_t *zone, dns_acache_t *acache) {
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(acache != NULL);
-
+
LOCK_ZONE(zone);
if (zone->acache != NULL)
dns_acache_detach(&zone->acache);
dns_fixedname_t fixed;
dns_name_t *foundname;
int level;
-
+
/*
* Outside of zone.
*/
dns_fixedname_t fixed;
dns_name_t *foundname;
int level;
-
+
/*
* "." means the services does not exist.
*/
dns_rdataset_t a;
dns_rdataset_t aaaa;
int level;
-
+
/*
* Outside of zone.
*/
if (tresult == ISC_R_SUCCESS) {
dns_rdataset_disassociate(&aaaa);
return (ISC_TRUE);
- }
+ }
if (tresult == DNS_R_DELEGATION)
dns_rdataset_disassociate(&aaaa);
if (result == DNS_R_GLUE || tresult == DNS_R_GLUE) {
if (dns_name_equal(name, &zone->origin))
goto checkmx;
- result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_ns,
+ result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_ns,
0, 0, &rdataset, NULL);
if (result != ISC_R_SUCCESS)
goto checkmx;
dns_rdataset_disassociate(&rdataset);
checkmx:
- result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_mx,
+ result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_mx,
0, 0, &rdataset, NULL);
if (result != ISC_R_SUCCESS)
goto checksrv;
checksrv:
if (zone->rdclass != dns_rdataclass_in)
goto next;
- result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_srv,
+ result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_srv,
0, 0, &rdataset, NULL);
if (result != ISC_R_SUCCESS)
goto next;
for (result = dns_rdataset_first(&rdataset);
result == ISC_R_SUCCESS;
- result = dns_rdataset_next(&rdataset))
+ result = dns_rdataset_next(&rdataset))
{
dns_rdataset_current(&rdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &dnskey, NULL);
INSIST(result == ISC_R_SUCCESS);
-
+
if ((dnskey.algorithm == DST_ALG_RSASHA1 ||
dnskey.algorithm == DST_ALG_RSAMD5) &&
dnskey.datalen > 1 && dnskey.data[0] == 1 &&
dns_db_detachnode(db, &node);
if (version != NULL)
dns_db_closeversion(db, &version, ISC_FALSE);
-
+
}
static isc_result_t
} else if (!isc_serial_ge(serial, zone->serial))
dns_zone_log(zone, ISC_LOG_ERROR,
"zone serial has gone backwards");
- else if (serial == zone->serial && !hasinclude)
+ else if (serial == zone->serial && !hasinclude)
dns_zone_log(zone, ISC_LOG_ERROR,
"zone serial unchanged. "
"zone may fail to transfer "
dns_fixedname_t fixed;
dns_name_t *foundname;
int level;
-
+
if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_NOCHECKNS))
return (ISC_TRUE);
}
LOCK_ZONE(zone);
- /*
+ /*
* The refresh code assumes that 'masters' wouldn't change under it.
* If it will change then kill off any current refresh in progress
* and update the masters info. If it won't change then we can just
goto unlock;
}
memcpy(new, masters, count * sizeof(*new));
-
+
/*
* Similarly for mastersok.
*/
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_rdataset_init(rdataset);
-
+
rdatalist->type = dns_rdatatype_opt;
rdatalist->covers = 0;
dns_message_puttemprdataset(message, &rdataset);
if (rdata != NULL)
dns_message_puttemprdata(message, &rdata);
-
+
return (result);
}
}
}
if (key == NULL)
- (void)dns_view_getpeertsig(zone->view, &masterip, &key);
+ (void)dns_view_getpeertsig(zone->view, &masterip, &key);
if (zone->view->peers != NULL) {
dns_peer_t *peer = NULL;
dns_resolver_getudpsize(zone->view->resolver);
(void)dns_peer_getudpsize(peer, &udpsize);
}
-
+
}
if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOEDNS)) {
result = add_opt(message, udpsize);
if (zone->writeio != NULL)
zonemgr_cancelio(zone->writeio);
- if (zone->dctx != NULL)
+ if (zone->dctx != NULL)
dns_dumpctx_cancel(zone->dctx);
}
}
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NEEDCOMPACT);
}
-
+
/*
* This transfer finishing freed up a transfer quota slot.
* Let any other zones waiting for quota have it.
ENTER;
tresult = dns_db_endload(load->db, &load->callbacks.add_private);
- if (tresult != ISC_R_SUCCESS &&
+ if (tresult != ISC_R_SUCCESS &&
(result == ISC_R_SUCCESS || result == DNS_R_SEENINCLUDE))
result = tresult;