Replace those terms with the preferred "primary/secondary" keywords.
}
/*
- * Is the redirect zone configured as a slave?
+ * Is the redirect zone configured as a secondary?
*/
if (strcasecmp(cfg_obj_asstring(typeobj), "redirect") == 0) {
cfg_map_get(zoptions, "primaries", &primariesobj);
}
/*%
- * Assigns a node to a worker thread. This is protected by the master task's
+ * Assigns a node to a worker thread. This is protected by the primary task's
* lock.
*/
static void
}
/*
- * Check that a master or slave zone was found for each
- * zone named in the response policy statement
- * unless we are using RPZ service interface.
+ * Check that a primary or secondary zone was found for each
+ * zone named in the response policy statement, unless we are
+ * using RPZ service interface.
*/
if (view->rpzs != NULL && !view->rpzs->p.dnsrps_enabled) {
dns_rpz_num_t n;
* - The zone's view exists
* - A zone with the right name exists in the view
* - The zone is compatible with the config
- * options (e.g., an existing master zone cannot
- * be reused if the options specify a slave zone)
+ * options (e.g., an existing primary zone cannot
+ * be reused if the options specify a secondary zone)
* - The zone was not and is still not a response policy zone
* or the zone is a policy zone with an unchanged number
* and we are using the old policy zone summary data.
/*
* Force zone maintenance. Do this after loading
* so that we know when we need to force AXFR of
- * slave zones whose master files are missing.
+ * secondary zones whose master files are missing.
*
* We use the zoneload reference counter to let us
* know when all views are finished.
dns_zone_unload(zone);
}
- /* Clean up stub/slave zone files if requested to do so */
+ /* Clean up stub/secondary zone files if requested to do so */
dns_zone_getraw(zone, &raw);
mayberaw = (raw != NULL) ? raw : zone;
isc_task_send(task, &dzevent);
dz = NULL;
- /* Inform user about cleaning up stub/slave zone files */
+ /* Inform user about cleaning up stub/secondary zone files */
dns_zone_getraw(zone, &raw);
mayberaw = (raw != NULL) ? raw : zone;
/*
* Export zone timers to the statistics channel in XML format. For
- * master zones, only include the loaded time. For slave zones, also
- * include the expires and refresh times.
+ * primary zones, only include the loaded time. For secondary zones,
+ * also include the expire and refresh times.
*/
-
CHECK(dns_zone_getloadtime(zone, ×tamp));
isc_time_formatISO8601(×tamp, buf, 64);
json_object *zonearray = (json_object *)arg;
json_object *zoneobj = NULL;
dns_zonestat_level_t statlevel;
+ isc_time_t timestamp;
statlevel = dns_zone_getstatlevel(zone);
if (statlevel == dns_zonestat_none) {
}
/*
- * Export zone timers to the statistics channel in JSON format. For
- * master zones, only include the loaded time. For slave zones, also
- * include the expires and refresh times.
+ * Export zone timers to the statistics channel in JSON format.
+ * For primary zones, only include the loaded time. For secondary
+ * zones, also include the expire and refresh times.
*/
- isc_time_t timestamp;
-
CHECK(dns_zone_getloadtime(zone, ×tamp));
isc_time_formatISO8601(×tamp, buf, 64);
}
/*
- * Unless we're using some alternative database, a master zone
+ * Unless we're using some alternative database, a primary zone
* will be needing a master file.
*/
if (ztype == dns_zone_primary && cpval == default_dbtype &&
}
/*
- * Configure master functionality. This applies
+ * Configure authoritative zone functionality. This applies
* to primary servers (type "primary") and secondaries
* acting as primaries (type "secondary"), but not to stubs.
*/
}
/*%
- * Primary master functionality.
+ * Configure primary zone functionality.
*/
if (ztype == dns_zone_primary) {
obj = NULL;
}
/*
- * Configure slave functionality.
+ * Configure secondary zone functionality.
*/
switch (ztype) {
case dns_zone_mirror:
dns_zone_setxfracl(zone, none);
dns_acl_detach(&none);
}
- /* FALLTHROUGH */
+ /* FALLTHROUGH */
case dns_zone_secondary:
case dns_zone_stub:
case dns_zone_redirect:
isc_task_detach(&global_task);
/*
- * The isc_mem_put of master_servers must be before the
+ * The isc_mem_put of primary_servers must be before the
* isc_mem_put of servers as it sets the servers pointer
* to NULL.
*/
/*
* If we have both the zone and the servers we have enough information
* to send the update straight away otherwise we need to discover
- * the zone and / or the master server.
+ * the zone and / or the primary server.
*/
if (userzone != NULL && !default_servers && !usegsstsig) {
master_from_servers();
# };
#
# zone "0.0.127.in-addr.arpa" {
-# type master;
+# type primary;
# file "/etc/namedb/localhost.rev";
# };
#
# zone "10.in-addr.arpa" {
-# type master;
+# type primary;
# file "/etc/namedb/primary/10";
# };
#
# zone "jab.fr" {
-# type master;
+# type primary;
# file "/etc/namedb/primary/jab.fr";
# };
#
## zone "test-zone.com" {
-## type master;
+## type primary;
## file "/usr/tmp/test-zone.com";
## };
#};
// forwarding behavior, i.e. ask the forwarders first, and if that
// doesn't work then do the full lookup. You can also say
// "forward only;" which is what used to be specified with
- // "slave" or "options forward-only". "only" will never attempt
+ // "secondary" or "options forward-only". "only" will never attempt
// a full lookup; only the forwarders will be used.
forward first;
forwarders {
/*
* We're pre-preparing the data once, we'll put it into
- * the right spot in the masters array once we find it.
+ * the right spot in the primaries array once we find it.
*/
result = dns_rdataset_first(value);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
}
/*
- * We have to find the appropriate labeled record in masters
- * if it exists.
- * In common case we'll have no more than 3-4 records here so
- * no optimization.
+ * We have to find the appropriate labeled record in
+ * primaries if it exists. In the common case we'll
+ * have no more than 3-4 records here, so no optimization.
*/
for (i = 0; i < ipkl->count; i++) {
if (ipkl->labels[i] != NULL &&
return (result);
}
+/*
+ * We have to generate a text buffer with regular zone config:
+ * zone "foo.bar" {
+ * type secondary;
+ * primaries [ dscp X ] { ip1 port port1; ip2 port port2; };
+ * }
+ */
isc_result_t
dns_catz_generate_zonecfg(dns_catz_zone_t *zone, dns_catz_entry_t *entry,
isc_buffer_t **buf) {
- /*
- * We have to generate a text buffer with regular zone config:
- * zone "foo.bar" {
- * type slave;
- * masters [ dscp X ] { ip1 port port1; ip2 port port2; };
- * }
- */
isc_buffer_t *buffer = NULL;
isc_region_t region;
isc_result_t result;
isc_buffer_putstr(buffer, "\" { type slave; masters");
/*
- * DSCP value has no default, but when it is specified, it is identical
- * for all masters and cannot be overridden for a specific master IP, so
- * use the DSCP value set for the first master
+ * DSCP value has no default, but when it is specified, it is
+ * identical for all primaries and cannot be overridden for a
+ * specific primary IP, so use the DSCP value set for the first
+ * primary.
*/
if (entry->opts.masters.count > 0 && entry->opts.masters.dscps[0] >= 0)
{
isc_buffer_putstr(buffer, " { ");
for (i = 0; i < entry->opts.masters.count; i++) {
/*
- * Every master must have an IP address assigned.
+ * Every primary must have an IP address assigned.
*/
switch (entry->opts.masters.addrs[i].type.sa.sa_family) {
case AF_INET:
/*
* Create a writeable DLZ zone. This can be called by DLZ drivers
* during configure() to create a zone that can be updated. The zone
- * type is set to dns_zone_dlz, which is equivalent to a master zone
+ * type is set to dns_zone_dlz, which is equivalent to a primary zone
*
* This function uses a callback setup in dns_dlzconfigure() to call
* into the server zone code to setup the remaining pieces of server
/*%
* A structure holding a list of addresses, dscps and keys. Used to
- * store masters for a slave zone, created by parsing config options.
+ * store primaries for a secondary zone, created by parsing config options.
*/
struct dns_ipkeylist {
isc_sockaddr_t *addrs;
#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. */
-#define DNS_MASTER_SLAVE 0x00000020 /*%< Loading a slave master file. */
+#define DNS_MASTER_SLAVE 0x00000020 /*%< Loading a secondary master file. */
#define DNS_MASTER_CHECKNS \
0x00000040 /*%< \
* Check NS records to see \
uint32_t sourceserial; /* Source serial number (used
* by inline-signing zones) */
uint32_t lastxfrin; /* timestamp of last transfer
- * (used by slave zones) */
+ * (used by secondary zones) */
};
/* The structure for each RRset */
/*%<
* This function may optionally be called from the 'authority' callback
* to simplify construction of the SOA record for 'zone'. It will
- * provide a SOA listing 'mname' as as the master server and 'rname' as
+ * provide a SOA listing 'mname' as as the primary server and 'rname' as
* the responsible person mailbox. It is the responsibility of the
* driver to increment the serial number between responses if necessary.
* All other SOA fields will have reasonable default values.
/*%<
* This function may optionally be called from the 'authority'
* callback to simplify construction of the SOA record for 'zone'. It
- * will provide a SOA listing 'mname' as as the master server and
+ * will provide a SOA listing 'mname' as as the primary server and
* 'rname' as the responsible person mailbox. It is the
* responsibility of the driver to increment the serial number between
* responses if necessary. All other SOA fields will have reasonable
isc_result_t
dns_view_freezezones(dns_view_t *view, bool freeze);
/*%<
- * Freeze/thaw updates to master zones.
+ * Freeze/thaw updates to primary zones.
*
* Requires:
* \li 'view' is valid.
dns_name_t **keynames, dns_name_t **tlsnames,
uint32_t count);
/*%<
- * Set the list of master servers for the zone.
+ * Set the list of primary servers for the zone.
*
* Require:
*\li 'zone' to be a valid zone.
dns_zonetype_t
dns_zone_gettype(dns_zone_t *zone);
/*%<
- * Returns the type of the zone (master/slave/etc.)
+ * Returns the type of the zone (primary/secondary/etc.)
*
* Requires:
*\li 'zone' to be valid initialised zone.
dns_zonetype_t
dns_zone_getredirecttype(dns_zone_t *zone);
/*%<
- * Returns whether the redirect zone is configured as a master or a
- * slave zone.
+ * Returns whether the redirect zone is configured as a primary or a
+ * secondary zone.
*
* Requires:
*\li 'zone' to be valid initialised zone.
dns_zone_forwardupdate(dns_zone_t *zone, dns_message_t *msg,
dns_updatecallback_t callback, void *callback_arg);
/*%<
- * Forward 'msg' to each master in turn until we get an answer or we
+ * Forward 'msg' to each primary in turn until we get an answer or we
* have exhausted the list of primaries. 'callback' will be called with
* ISC_R_SUCCESS if we get an answer and the returned message will be
* passed as 'answer_message', otherwise a non ISC_R_SUCCESS result code
* master file (if any) is written by the server, rather than being
* updated manually and read by the server.
*
- * This is true for slave zones, stub zones, key zones, and zones that
+ * This is true for secondary zones, stub zones, key zones, and zones that
* allow dynamic updates either by having an update policy ("ssutable")
* or an "allow-update" ACL with a value other than exactly "{ none; }".
*
isc_result_t
dns_zone_getrefreshtime(dns_zone_t *zone, isc_time_t *refreshtime);
/*%
- * Return the time when the (slave) zone will need to be refreshed.
+ * Return the time when the (secondary) zone will need to be refreshed.
*/
isc_result_t
dns_zone_getexpiretime(dns_zone_t *zone, isc_time_t *expiretime);
/*%
- * Return the time when the (slave) zone will expire.
+ * Return the time when the (secondary) zone will expire.
*/
isc_result_t
isc_result_t
dns_zt_freezezones(dns_zt_t *zt, dns_view_t *view, bool freeze);
/*%<
- * Freeze/thaw updates to master zones.
+ * Freeze/thaw updates to primary zones.
* Any pending updates will be flushed.
* Zones will be reloaded on thaw.
*/
{
/*
* This must be the single SOA record that is
- * sent when the current version on the master
+ * sent when the current version on the primary
* is not newer than the version in the request.
*/
xfrin_log(xfr, ISC_LOG_DEBUG(3),
* master file (if any) is written by the server, rather than being
* updated manually and read by the server.
*
- * This is true for slave zones, mirror zones, stub zones, key zones,
+ * This is true for secondary zones, mirror zones, stub zones, key zones,
* and zones that allow dynamic updates either by having an update
* policy ("ssutable") or an "allow-update" ACL with a value other than
* exactly "{ none; }".
is_dynamic = dns_zone_isdynamic(zone, false);
if (zone->db != NULL && is_dynamic) {
/*
- * This is a slave, stub, or dynamically updated zone being
- * reloaded. Do nothing - the database we already
+ * This is a secondary, stub, or dynamically updated zone
+ * being reloaded. Do nothing - the database we already
* have is guaranteed to be up-to-date.
*/
if (zone->type == dns_zone_primary && !hasraw) {
"loaded; checking validity");
/*
- * Master / Slave / Mirror / Stub zones require both NS and SOA records
- * at the top of the zone.
+ * Primary / Secondary / Mirror / Stub zones require both NS and SOA
+ * records at the top of the zone.
*/
switch (zone->type) {
unsigned int oldsoacount;
/*
- * This is checked in zone_replacedb() for slave zones
- * as they don't reload from disk.
+ * This is checked in zone_replacedb() for
+ * secondary zones as they don't reload from disk.
*/
result = zone_get_from_db(
zone, zone->db, NULL, &oldsoacount, NULL,
}
/*
- * Master/redirect zones send notifies now, if needed
+ * Primary/redirect zones send notifies now, if needed
*/
switch (zone->type) {
case dns_zone_primary:
}
/*
- * Find serial and master server's name.
+ * Find serial and primary server's name.
*/
dns_name_init(&master, NULL);
result = dns_rdataset_first(&soardset);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
dns_rdata_reset(&rdata);
/*
- * Don't notify the master server unless explicitly
+ * Don't notify the primary server unless explicitly
* configured to do so.
*/
if (!DNS_ZONE_OPTION(zone, DNS_ZONEOPT_NOTIFYTOSOA) &&
/*
* Called when stub zone update is finished.
* Update zone refresh, retry, expire values accordingly with
- * SOA received from master, sync database to file, restart
+ * SOA received from primary, sync database to file, restart
* zone management timer.
*/
static void
}
/*
- * Create and send an A or AAAA query to the master
+ * Create and send an A or AAAA query to the primary
* server of the stub zone given.
*/
static isc_result_t
}
/*
- * If non-auth log and next master.
+ * If non-auth log and next primary.
*/
if ((msg->flags & DNS_MESSAGEFLAG_AA) == 0) {
dns_zone_log(zone, ISC_LOG_INFO,
isc_event_free(&event);
dns_request_destroy(&zone->request);
/*
- * Skip to next failed / untried master.
+ * Skip to next failed / untried primary.
*/
do {
zone->curmaster++;
}
/*
- * if timeout log and next master;
+ * if timeout log and next primary;
*/
isc_sockaddr_format(&zone->masteraddr, master, sizeof(master));
}
/*
- * if non-auth log and next master;
+ * if non-auth log and next primary;
*/
if ((msg->flags & DNS_MESSAGEFLAG_AA) == 0) {
dns_zone_log(zone, ISC_LOG_INFO,
}
/*
- * if referral log and next master;
+ * if referral log and next primary;
*/
if (soacnt == 0 && soacount == 0 && nscount != 0) {
dns_zone_log(zone, ISC_LOG_INFO,
}
/*
- * if nodata log and next master;
+ * if nodata log and next primary;
*/
if (soacnt == 0 && (nscount == 0 || soacount != 0)) {
dns_zone_log(zone, ISC_LOG_INFO,
isc_event_free(&event);
dns_request_destroy(&zone->request);
/*
- * Skip to next failed / untried master.
+ * Skip to next failed / untried primary.
*/
do {
zone->curmaster++;
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
zone->curmaster = 0;
/*
- * Find the next failed master.
+ * Find the next failed primary.
*/
while (zone->curmaster < zone->masterscnt &&
zone->mastersok[zone->curmaster]) {
isc_netaddr_fromsockaddr(&masterip, &zone->masteraddr);
/*
- * First, look for a tsig key in the master statement, then
+ * First, look for a tsig key in the primaries statement, then
* try for a server key.
*/
if ((zone->masterkeynames != NULL) &&
dns_message_detach(&message);
}
/*
- * Skip to next failed / untried master.
+ * Skip to next failed / untried primary.
*/
do {
zone->curmaster++;
isc_netaddr_fromsockaddr(&masterip, &zone->masteraddr);
/*
- * First, look for a tsig key in the master statement, then
+ * First, look for a tsig key in the primaries statement, then
* try for a server key.
*/
if ((zone->masterkeynames != NULL) &&
}
/*
- * If we are a master zone just succeed.
+ * If we are a primary zone just succeed.
*/
if (zone->type == dns_zone_primary) {
UNLOCK_ZONE(zone);
}
/*
- * Accept notify requests from non masters if they are on
+ * Accept notify requests from non primaries if they are on
* 'zone->notify_acl'.
*/
tsigkey = dns_message_gettsigkey(msg);
dns_db_currentversion(db, &ver);
/*
- * The initial version of a slave zone is always dumped;
+ * The initial version of a secondary zone is always dumped;
* subsequent versions may be journaled instead if this
* is enabled in the configuration.
*/
}
/*
- * This is checked in zone_postload() for master zones.
+ * This is checked in zone_postload() for primary zones.
*/
result = zone_get_from_db(zone, zone->db, NULL, &soacount, NULL,
&oldserial, NULL, NULL, NULL, NULL,
default:
next_master:
/*
- * Skip to next failed / untried master.
+ * Skip to next failed / untried primary.
*/
do {
zone->curmaster++;
result = ISC_R_NOTFOUND;
/*
- * First, look for a tsig key in the master statement, then
+ * First, look for a tsig key in the primaries statement, then
* try for a server key.
*/
if ((zone->masterkeynames != NULL) &&
* Always use TCP regardless of whether the original update
* used TCP.
* XXX The timeout may but a bit small if we are far down a
- * transfer graph and the master has to try several masters.
+ * transfer graph and have to try several primaries.
*/
switch (isc_sockaddr_pf(&forward->addr)) {
case PF_INET:
* Not enough quota. This is probably the per-server
* quota, because we usually get called when a unit of
* global quota has just been freed. Try the next
- * zone, it may succeed if it uses another master.
+ * zone, it may succeed if it uses another primary.
*/
continue;
} else {
/*
* Count the total number of transfers that are in progress,
- * and the number of transfers in progress from this master.
+ * and the number of transfers in progress from this primary.
* We linearly scan a list of all transfers; if this turns
- * out to be too slow, we could hash on the master address.
+ * out to be too slow, we could hash on the primary address.
*/
nxfrsin = nxfrsperns = 0;
for (x = ISC_LIST_HEAD(zmgr->xfrin_in_progress); x != NULL;
/*
* Accept update messages signed by unknown keys so that
* update forwarding works transparently through slaves
- * that don't have all the same keys as the master.
+ * that don't have all the same keys as the primary.
*/
if (!(client->message->tsigstatus == dns_tsigerror_badkey &&
client->message->opcode == dns_opcode_update))
}
/*
- * Set the expire time, if requested, when answering from a slave, mirror, or
- * master zone.
+ * Set the expire time, if requested, when answering from a secondary,
+ * mirror, or primary zone.
*/
static void
query_getexpire(query_ctx_t *qctx) {
/*%
* Override the default acl logging when checking whether a client
* can update the zone or whether we can forward the request to the
- * master based on IP address.
+ * primary server based on IP address.
*
* 'message' contains the type of operation that is being attempted.
- * 'slave' indicates if this is a slave zone. If 'acl' is NULL then
- * log at debug=3.
+ *
+ * 'secondary' indicates whether this is a secondary zone.
+ *
* If the zone has no access controls configured ('acl' == NULL &&
- * 'has_ssutable == ISC_FALS) log the attempt at info, otherwise
- * at error.
+ * 'has_ssutable == false`), log the attempt at info, otherwise at error.
+ * If 'secondary' is true, log at debug=3.
*
- * If the request was signed log that we received it.
+ * If the request was signed, log that we received it.
*/
static isc_result_t
checkupdateacl(ns_client_t *client, dns_acl_t *acl, const char *message,
case dns_zone_dlz:
/*
* We can now fail due to a bad signature as we now know
- * that we are the master.
+ * that we are the primary.
*/
if (sigresult != ISC_R_SUCCESS) {
FAIL(sigresult);
unsigned int max = 0;
/*
- * RFC1123 doesn't allow MF and MD in master zones.
+ * RFC1123 doesn't allow MF and MD in master files.
*/
if (rdata.type == dns_rdatatype_md ||
rdata.type == dns_rdatatype_mf) {
dns_zone_markdirty(zone);
/*
- * Notify slaves of the change we just made.
+ * Notify secondaries of the change we just made.
*/
dns_zone_notify(zone);
/* zone table has a match */
switch (dns_zone_gettype(zone)) {
/*
- * Master, slave, and mirror zones are OK for transfer.
+ * Primary, secondary, and mirror zones are OK for transfer.
*/
case dns_zone_primary:
case dns_zone_secondary:
* when compressed even if they do not fit when
* uncompressed, but surely we don't want
* to send such monstrosities to an unsuspecting
- * slave.
+ * secondary.
*/
if (n_rrs == 0) {
xfrout_log(xfr, ISC_LOG_WARNING,