mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
prevent a possible race in setting up zone->xfr
the call to dns_xfrin_create() wrote to zone->xfr with the zone unlocked.
This commit is contained in:
parent
c05cf6d80e
commit
7d59a0ed81
1 changed files with 3 additions and 1 deletions
|
|
@ -18152,6 +18152,7 @@ got_transfer_quota(void *arg) {
|
|||
const char *soa_before = "";
|
||||
bool loaded;
|
||||
isc_tlsctx_cache_t *zmgr_tlsctx_cache = NULL;
|
||||
dns_xfrin_t *xfr = NULL;
|
||||
|
||||
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING)) {
|
||||
zone_xfrdone(zone, NULL, ISC_R_CANCELED);
|
||||
|
|
@ -18302,7 +18303,7 @@ got_transfer_quota(void *arg) {
|
|||
result = dns_xfrin_create(zone, xfrtype, &primaryaddr, &sourceaddr,
|
||||
zone->tsigkey, soa_transport_type,
|
||||
zone->transport, zmgr_tlsctx_cache,
|
||||
zone->mctx, zone_xfrdone, &zone->xfr);
|
||||
zone->mctx, zone_xfrdone, &xfr);
|
||||
|
||||
isc_tlsctx_cache_detach(&zmgr_tlsctx_cache);
|
||||
|
||||
|
|
@ -18317,6 +18318,7 @@ got_transfer_quota(void *arg) {
|
|||
}
|
||||
|
||||
LOCK_ZONE(zone);
|
||||
zone->xfr = xfr;
|
||||
if (xfrtype == dns_rdatatype_axfr) {
|
||||
if (isc_sockaddr_pf(&primaryaddr) == PF_INET) {
|
||||
inc_stats(zone, dns_zonestatscounter_axfrreqv4);
|
||||
|
|
|
|||
Loading…
Reference in a new issue