}
void
-forward_cancel(dns_zone_t *zone) {
+dns__zone_forward_cancel(dns_zone_t *zone) {
/*
* 'zone' locked by caller.
*/
ISC_LIST_UNLINK(zone->zmgr->xfrin_in_progress, zone,
statelink);
zone->statelist = NULL;
- zmgr_resume_xfrs(zone->zmgr, false);
+ dns__zonemgr_resume_xfrs(zone->zmgr, false);
}
RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
}
/*
- * In loop context, no locking required. See zone_xfrdone().
+ * In loop context, no locking required. See dns__zone_xfrdone().
*/
if (zone->xfr != NULL) {
- /* The final detach will happen in zone_xfrdone() */
+ /* The final detach will happen in dns__zone_xfrdone() */
dns_xfrin_shutdown(zone->xfr);
}
dns_notify_cancel(&zone->notifysoa);
dns_notify_cancel(&zone->notifycds);
- forward_cancel(zone);
+ dns__zone_forward_cancel(zone);
if (zone->timer != NULL) {
isc_refcount_decrement(&zone->irefs);
}
void
-zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result) {
+dns__zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result) {
isc_time_t now, expiretime;
bool again = false;
unsigned int soacount;
RWLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
ISC_LIST_UNLINK(zone->zmgr->xfrin_in_progress, zone, statelink);
zone->statelist = NULL;
- zmgr_resume_xfrs(zone->zmgr, false);
+ dns__zonemgr_resume_xfrs(zone->zmgr, false);
RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
LOCK_ZONE(zone);
}
ISC_LIST_APPEND(zmgr->waiting_for_xfrin, zone, statelink);
isc_refcount_increment0(&zone->irefs);
zone->statelist = &zmgr->waiting_for_xfrin;
- result = zmgr_start_xfrin_ifquota(zmgr, zone);
+ result = dns__zonemgr_start_xfrin_ifquota(zmgr, zone);
RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write);
if (result == ISC_R_QUOTA) {
*/
void
-forward_cancel(dns_zone_t *zone);
+dns__zone_forward_cancel(dns_zone_t *zone);
/*%<
* Cancel forwarding.
*
*/
void
-zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result);
+dns__zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result);
/*%<
* Process a finished zone transfer.
*
*/
isc_result_t
-zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone);
+dns__zonemgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone);
/*%<
* Try to start an incoming zone transfer for 'zone', quota permitting.
*
*/
void
-zmgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi);
+dns__zonemgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi);
/*%<
* Try to start a new incoming zone transfer to fill a quota
* slot that was just vacated.
* possible.
*/
RWLOCK(&zmgr->rwlock, isc_rwlocktype_write);
- zmgr_resume_xfrs(zmgr, true);
+ dns__zonemgr_resume_xfrs(zmgr, true);
RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write);
return ISC_R_SUCCESS;
}
RWLOCK(&zmgr->rwlock, isc_rwlocktype_read);
ISC_LIST_FOREACH(zmgr->zones, zone, link) {
LOCK_ZONE(zone);
- forward_cancel(zone);
+ dns__zone_forward_cancel(zone);
UNLOCK_ZONE(zone);
}
RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_read);
* The zone manager is locked by the caller.
*/
void
-zmgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi) {
+dns__zonemgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi) {
ISC_LIST_FOREACH(zmgr->waiting_for_xfrin, zone, statelink) {
isc_result_t result;
- result = zmgr_start_xfrin_ifquota(zmgr, zone);
+ result = dns__zonemgr_start_xfrin_ifquota(zmgr, zone);
if (result == ISC_R_SUCCESS) {
if (multi) {
continue;
dns_xfrin_t *xfr = NULL;
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING)) {
- zone_xfrdone(zone, NULL, ISC_R_CANCELED);
+ dns__zone_xfrdone(zone, NULL, ISC_R_CANCELED);
return;
}
"got_transfer_quota: skipping zone transfer as "
"primary %s (source %s) is unreachable (cached)",
primary, source);
- zone_xfrdone(zone, NULL, ISC_R_CANCELED);
+ dns__zone_xfrdone(zone, NULL, ISC_R_CANCELED);
return;
}
* zone transfer. This ensures that we get removed from
* zmgr->xfrin_in_progress.
*/
- result = dns_xfrin_start(zone->xfr, zone_xfrdone);
+ result = dns_xfrin_start(zone->xfr, dns__zone_xfrdone);
if (result != ISC_R_SUCCESS) {
- zone_xfrdone(zone, NULL, result);
+ dns__zone_xfrdone(zone, NULL, result);
return;
}
*
* Returns:
* ISC_R_SUCCESS There was enough quota and we attempted to
- * start a transfer. zone_xfrdone() has been or will
+ * start a transfer. dns__zone_xfrdone() has been or will
* be called.
* ISC_R_QUOTA Not enough quota.
* Others Failure.
*/
isc_result_t
-zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone) {
+dns__zonemgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone) {
dns_peer_t *peer = NULL;
isc_netaddr_t primaryip;
isc_sockaddr_t curraddr;