mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-14 00:20:00 -04:00
Introduce zone functions dns_zone_(get|set)modded
Introduce new functions to set and get whether the zone configuration has been modified with 'rndc modzone'.
This commit is contained in:
parent
13414c640b
commit
e1bd1a4003
2 changed files with 40 additions and 0 deletions
|
|
@ -2243,6 +2243,26 @@ dns_zone_getadded(dns_zone_t *zone);
|
|||
* \li 'zone' to be valid.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_zone_setmodded(dns_zone_t *zone, bool added);
|
||||
/*%
|
||||
* Sets the value of zone->modded, which should be true for
|
||||
* zones that were modified by "rndc modzone".
|
||||
*
|
||||
* Requires:
|
||||
* \li 'zone' to be valid.
|
||||
*/
|
||||
|
||||
bool
|
||||
dns_zone_getmodded(dns_zone_t *zone);
|
||||
/*%
|
||||
* Returns true if the zone was modified at runtime
|
||||
* using "rndc modzone".
|
||||
*
|
||||
* Requires:
|
||||
* \li 'zone' to be valid.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_zone_setautomatic(dns_zone_t *zone, bool automatic);
|
||||
/*%
|
||||
|
|
|
|||
|
|
@ -422,6 +422,11 @@ struct dns_zone {
|
|||
*/
|
||||
bool added;
|
||||
|
||||
/*%
|
||||
* True if modded by "rndc modzone"
|
||||
*/
|
||||
bool modded;
|
||||
|
||||
/*%
|
||||
* True if added by automatically by named.
|
||||
*/
|
||||
|
|
@ -22636,6 +22641,21 @@ dns_zone_getadded(dns_zone_t *zone) {
|
|||
return zone->added;
|
||||
}
|
||||
|
||||
void
|
||||
dns_zone_setmodded(dns_zone_t *zone, bool modded) {
|
||||
REQUIRE(DNS_ZONE_VALID(zone));
|
||||
|
||||
LOCK_ZONE(zone);
|
||||
zone->modded = modded;
|
||||
UNLOCK_ZONE(zone);
|
||||
}
|
||||
|
||||
bool
|
||||
dns_zone_getmodded(dns_zone_t *zone) {
|
||||
REQUIRE(DNS_ZONE_VALID(zone));
|
||||
return zone->modded;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_zone_dlzpostload(dns_zone_t *zone, dns_db_t *db) {
|
||||
isc_time_t loadtime;
|
||||
|
|
|
|||
Loading…
Reference in a new issue