bind9/bin
Aram Sargsyan 3262ebd0f3 xfrin: refactor and fix the ISC_R_CANCELED case handling
Previously a ISC_R_CANCELED result code switch-case has been added to
the zone.c:zone_xfrdone() function, which did two things:

1. Schedule a new zone transfer if there's a scheduled force reload of
   the zone.

2. Reset the primaries list.

This proved to be not a well-thought change and causes problems,
because the ISC_R_CANCELED code is used not only when the whole transfer
is canceled, but also when, for example, a particular primary server is
unreachable, and named still needs to continue the transfer process by
trying the next server, which it now no longer does in some cases. To
solve this issue, three changes are made:

1. Make sure dns_zone_refresh() runs on the zone's loop, so that the
   sequential calls of dns_zone_stopxfr() and dns_zone_forcexfr()
   functions (like done in 'rndc retransfer -force') run in intended
   order and don't race with each other.

2. Since starting the new transfer is now guaranteed to run after the
   previous transfer is shut down (see the previous change), remove the
   special handling of the ISC_R_CANCELED case, and let the default
   handler to handle it like before. This will bring back the ability to
   try the next primary if the current one was interrupted with a
   ISC_R_CANCELED result code.

3. Change the xfrin.c:xfrin_shutdown() function to pass the
   ISC_R_SHUTTINGDOWN result code instead of ISC_R_CANCELED, as it makes
   more sense.
2024-11-27 10:37:13 +00:00
..
check Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
confgen Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
delv Delv now supports selecting FIPS mode at runtime 2024-11-22 09:40:46 +11:00
dig Dig now supports selecting FIPS mode at runtime 2024-11-22 09:40:46 +11:00
dnssec Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
named Load default listen-on[-v6] values from config.c 2024-11-26 15:22:12 -08:00
nsupdate Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
plugins Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
rndc Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
tests xfrin: refactor and fix the ISC_R_CANCELED case handling 2024-11-27 10:37:13 +00:00
tools Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
Makefile.am Remove native PKCS#11 support 2021-09-09 15:35:39 +02:00