mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
change #1679 still left case where address could not be tried.
fix loop termination condition to ensure that all finds are tried.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: resolver.c,v 1.290 2004/06/25 04:39:19 marka Exp $ */
|
||||
/* $Id: resolver.c,v 1.291 2004/06/27 01:21:41 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -2059,7 +2059,7 @@ possibly_mark(fetchctx_t *fctx, dns_adbaddrinfo_t *addr)
|
||||
|
||||
static inline dns_adbaddrinfo_t *
|
||||
fctx_nextaddress(fetchctx_t *fctx) {
|
||||
dns_adbfind_t *find;
|
||||
dns_adbfind_t *find, *start;
|
||||
dns_adbaddrinfo_t *addrinfo;
|
||||
dns_adbaddrinfo_t *faddrinfo;
|
||||
|
||||
@@ -2103,6 +2103,7 @@ fctx_nextaddress(fetchctx_t *fctx) {
|
||||
*/
|
||||
addrinfo = NULL;
|
||||
if (find != NULL) {
|
||||
start = find;
|
||||
do {
|
||||
for (addrinfo = ISC_LIST_HEAD(find->list);
|
||||
addrinfo != NULL;
|
||||
@@ -2120,7 +2121,7 @@ fctx_nextaddress(fetchctx_t *fctx) {
|
||||
find = ISC_LIST_NEXT(find, publink);
|
||||
if (find != fctx->find && find == NULL)
|
||||
find = ISC_LIST_HEAD(fctx->finds);
|
||||
} while (find != fctx->find);
|
||||
} while (find != start);
|
||||
}
|
||||
|
||||
fctx->find = find;
|
||||
@@ -2147,6 +2148,7 @@ fctx_nextaddress(fetchctx_t *fctx) {
|
||||
*/
|
||||
addrinfo = NULL;
|
||||
if (find != NULL) {
|
||||
start = find;
|
||||
do {
|
||||
for (addrinfo = ISC_LIST_HEAD(find->list);
|
||||
addrinfo != NULL;
|
||||
@@ -2164,7 +2166,7 @@ fctx_nextaddress(fetchctx_t *fctx) {
|
||||
find = ISC_LIST_NEXT(find, publink);
|
||||
if (find != fctx->altfind && find == NULL)
|
||||
find = ISC_LIST_HEAD(fctx->altfinds);
|
||||
} while (find != fctx->altfind);
|
||||
} while (find != start);
|
||||
}
|
||||
|
||||
faddrinfo = addrinfo;
|
||||
|
Reference in New Issue
Block a user