Lines Matching defs:zone

35 #include <dns/zone.h>
44 /* ACLs associated with zone */
67 * Convenience function for configuring a single zone ACL.
72 cfg_aclconfctx_t *actx, dns_zone_t *zone,
84 view = dns_zone_getview(zone);
122 /* First check to see if ACL is defined within the zone */
134 (*setzacl)(zone, *aclp);
155 (*clearzacl)(zone);
161 dns_zone_getmctx(zone), 0, &acl);
164 (*setzacl)(zone, acl);
175 * Parse the zone update-policy statement.
178 configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
184 isc_mem_t *mctx = dns_zone_getmctx(zone);
191 dns_zone_setssutable(zone, NULL);
252 result = dns_name_copy(dns_zone_getorigin(zone),
335 "for zone %s: session key not found",
344 dns_zone_getorigin(zone),
352 dns_zone_setssutable(zone, table);
367 * Configure an apex NS with glues for a static-stub zone.
368 * For example, for the zone named "example.com", the following RRs will be
369 * added to the zone DB:
375 configure_staticstub_serveraddrs(const cfg_obj_t *zconfig, dns_zone_t *zone,
381 isc_mem_t *mctx = dns_zone_getmctx(zone);
429 dns_rdata_fromregion(rdata, dns_zone_getclass(zone),
444 dns_name_toregion(dns_zone_getorigin(zone), &sregion);
457 dns_rdata_fromregion(rdata, dns_zone_getclass(zone),
465 * Configure an apex NS with an out-of-zone NS names for a static-stub zone.
466 * For example, for the zone named "example.com", something like the following
467 * RRs will be added to the zone DB:
471 configure_staticstub_servernames(const cfg_obj_t *zconfig, dns_zone_t *zone,
475 isc_mem_t *mctx = dns_zone_getmctx(zone);
505 if (dns_name_issubdomain(nsname, dns_zone_getorigin(zone))) {
508 "subdomain of zone name '%s'",
521 dns_rdata_fromregion(rdata, dns_zone_getclass(zone),
530 * Configure static-stub zone.
533 configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
538 isc_mem_t *mctx = dns_zone_getmctx(zone);
553 RETERR(dns_db_create(mctx, dbtype, dns_zone_getorigin(zone),
554 dns_dbtype_stub, dns_zone_getclass(zone),
556 dns_zone_setdb(zone, db);
559 rdatalist_ns.rdclass = dns_zone_getclass(zone);
564 rdatalist_a.rdclass = dns_zone_getclass(zone);
569 rdatalist_aaaa.rdclass = dns_zone_getclass(zone);
573 /* Prepare zone RRs from the configuration */
578 result = configure_staticstub_serveraddrs(obj, zone,
590 result = configure_staticstub_servernames(obj, zone,
598 * Sanity check: there should be at least one NS RR at the zone apex
605 "static-stub zone '%s'", zname);
611 * Now add NS and glue A/AAAA RRsets to the zone DB.
619 dns_name_clone(dns_zone_getorigin(zone), &apexname);
681 * Convert a config file zone type into a server zone type.
743 const char *zone = NULL;
747 case dns_zone_slave: zone = "slave"; break;
748 case dns_zone_master: zone = "master"; break;
752 result = ns_checknames_get(maps, zone, objp);
759 dns_zone_t *zone, dns_zone_t *raw)
779 isc_mem_t *mctx = dns_zone_getmctx(zone);
796 dns_zone_t *mayberaw = (raw != NULL) ? raw : zone;
827 * Configure values common to all zone types.
834 dns_zone_setclass(zone, zclass);
841 dns_zone_settype(zone, dns_zone_master);
843 dns_zone_settype(zone, ztype);
861 "zone '%s': both 'database' and 'dlz' "
884 result = dns_zone_setdbtype(zone, dbargc, (const char * const *)dbargv);
897 * Unless we're using some alternative database, a master zone
904 "zone '%s': 'file' not specified",
935 "zone '%s': 'masterfile-style' "
950 result = ns_config_get(maps, "max-zone-ttl", &obj);
954 "zone '%s': 'max-zone-ttl' is not compatible "
962 dns_zone_setmaxttl(zone, maxttl);
971 if (zone != mayberaw)
972 dns_zone_setmaxrecords(zone, 0);
986 result = dns_zone_setfile3(zone, signedname,
992 RETERR(dns_zone_setfile3(zone, filename,
1001 * Notify messages are processed by the raw zone if it exists.
1013 allow_query, ac, zone,
1018 allow_query_on, ac, zone,
1045 dns_zone_setdialup(zone, dialup);
1048 result = ns_config_get(maps, "zone-statistics", &obj);
1066 dns_zone_setstatlevel(zone, statlevel);
1076 dns_zone_setrequeststats(zone, zoneqrystats);
1077 dns_zone_setrcvquerystats(zone, rcvquerystats);
1111 dns_zone_setnotifytype(zone, notifytype);
1126 result = dns_zone_setalsonotifydscpkeys(zone,
1134 RETERR(dns_zone_setalsonotify(zone, NULL, 0));
1139 RETERR(dns_zone_setnotifysrc4(zone, cfg_obj_assockaddr(obj)));
1143 RETERR(dns_zone_setnotifysrc4dscp(zone, dscp));
1149 RETERR(dns_zone_setnotifysrc6(zone, cfg_obj_assockaddr(obj)));
1153 RETERR(dns_zone_setnotifysrc6dscp(zone, dscp));
1159 dns_zone_setoption(zone, DNS_ZONEOPT_NOTIFYTOSOA,
1162 dns_zone_setisself(zone, ns_client_isself, NULL);
1165 allow_transfer, ac, zone,
1172 dns_zone_setmaxxfrout(zone, cfg_obj_asuint32(obj) * 60);
1177 dns_zone_setidleout(zone, cfg_obj_asuint32(obj) * 60);
1184 dns_zone_setjournalsize(zone, -1);
1205 dns_zone_setjournalsize(zone, journal_size);
1223 dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS,
1226 dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS,
1232 dns_zone_setrequestexpire(zone, cfg_obj_asboolean(obj));
1237 dns_zone_setrequestixfr(zone, cfg_obj_asboolean(obj));
1255 dns_zone_setoption(zone, DNS_ZONEOPT_CHECKNAMES,
1257 dns_zone_setoption(zone, DNS_ZONEOPT_CHECKNAMESFAIL,
1260 dns_zone_setoption(zone, DNS_ZONEOPT_CHECKNAMES,
1262 dns_zone_setoption(zone, DNS_ZONEOPT_CHECKNAMESFAIL,
1269 dns_zone_setnotifydelay(zone, cfg_obj_asuint32(obj));
1274 dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSIBLING,
1286 dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSPF, check);
1291 dns_zone_setzeronosoattl(zone, cfg_obj_asboolean(obj));
1294 result = ns_config_get(maps, "nsec3-test-zone", &obj);
1296 dns_zone_setoption(zone, DNS_ZONEOPT_NSEC3TESTZONE,
1299 dns_zone_setnotifytype(zone, dns_notifytype_no);
1304 dns_zone_setjournalsize(zone, -1);
1323 dns_zone_setjournalsize(zone, journal_size);
1342 "zone '%s' allows unsigned updates "
1360 dns_zone_setsigvalidityinterval(zone, seconds);
1373 dns_zone_setsigresigninginterval(zone, seconds);
1380 RETERR(dns_zone_setkeydirectory(zone, filename));
1386 dns_zone_setsignatures(zone, cfg_obj_asuint32(obj));
1391 dns_zone_setnodes(zone, cfg_obj_asuint32(obj));
1396 dns_zone_setprivatetype(zone, cfg_obj_asuint32(obj));
1401 dns_zone_setoption(zone, DNS_ZONEOPT_UPDATECHECKKSK,
1407 dns_zone_setoption(zone, DNS_ZONEOPT_DNSKEYKSKONLY,
1413 RETERR(dns_zone_setrefreshkeyinterval(zone,
1428 dns_zone_setkeyopt(zone, DNS_ZONEKEY_ALLOW, allow);
1429 dns_zone_setkeyopt(zone, DNS_ZONEKEY_MAINTAIN, maint);
1561 dns_zone_setkeyopt(zone, DNS_ZONEKEY_NORESIGN,
1573 dns_zone_setserialupdatemethod(zone,
1576 dns_zone_setserialupdatemethod(zone,
1579 dns_zone_setserialupdatemethod(zone,
1697 view = dns_zone_getview(zone);
1713 RETERR(configure_staticstub(zoptions, zone, zname,
1726 * Set up a DLZ zone as writeable
1729 ns_zone_configure_writeable_dlz(dns_dlzdb_t *dlzdatabase, dns_zone_t *zone,
1738 dns_zone_settype(zone, dns_zone_dlz);
1742 result = dns_zone_dlzpostload(zone, db);
1748 ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
1760 * We always reconfigure a static-stub zone for simplicity, assuming
1764 dns_zone_log(zone, ISC_LOG_DEBUG(1),
1769 /* If there's a raw zone, use that for filename and type comparison */
1770 dns_zone_getraw(zone, &raw);
1777 zfilename = dns_zone_getfile(zone);
1778 ztype = dns_zone_gettype(zone);
1785 dns_zone_log(zone, ISC_LOG_DEBUG(1),
1786 "not reusable: old zone was inline-signing");
1789 dns_zone_log(zone, ISC_LOG_DEBUG(1),
1790 "not reusable: old zone was not inline-signing");
1795 dns_zone_log(zone, ISC_LOG_DEBUG(1),
1810 dns_zone_log(zone, ISC_LOG_DEBUG(1),