]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
change #1679 still left case where address could not be tried.
authorMark Andrews <marka@isc.org>
Sun, 27 Jun 2004 01:30:07 +0000 (01:30 +0000)
committerMark Andrews <marka@isc.org>
Sun, 27 Jun 2004 01:30:07 +0000 (01:30 +0000)
fix loop termination condition to ensure that all finds are tried.

lib/dns/resolver.c

index 39eebe1df896e857b7a8feb5ce3332b19221541d..3f0130d3e6b89d0729b3c94fd86ef9e445cab15f 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.218.2.32 2004/06/25 04:44:57 marka Exp $ */
+/* $Id: resolver.c,v 1.218.2.33 2004/06/27 01:30:07 marka Exp $ */
 
 #include <config.h>
 
@@ -1775,7 +1775,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;
 
        /*
@@ -1813,6 +1813,7 @@ fctx_nextaddress(fetchctx_t *fctx) {
         */
        addrinfo = NULL;
        if (find != NULL) {
+               start = find;
                do {
                        for (addrinfo = ISC_LIST_HEAD(find->list);
                             addrinfo != NULL;
@@ -1828,7 +1829,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;