]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix dual-stack-servers
authorMark Andrews <marka@isc.org>
Fri, 1 Nov 2024 02:54:52 +0000 (13:54 +1100)
committerMark Andrews <marka@isc.org>
Tue, 25 Feb 2025 23:47:46 +0000 (23:47 +0000)
Named was stopping nameserver address resolution attempts too soon
when dual stack servers are configured.  Dual stack servers are
used when there are *not* addresses for the server in a particular
address family so find->status == DNS_ADB_NOMOREADDRESSES is not a
sufficient stopping condition when dual stack servers are available.
Call fctx_try to see if the alternate servers can be used.

lib/dns/resolver.c

index 73d4815163f52fe4203813fc702c405707597ef1..262cb51b68580aa489999cb606c6255ce330238a 100644 (file)
@@ -2932,13 +2932,17 @@ fctx_finddone(void *arg) {
                } else {
                        fctx->findfail++;
                        if (atomic_load_acquire(&fctx->pending) == 0) {
-                               /*
-                                * We've got nothing else to wait for
-                                * and don't know the answer.  There's
-                                * nothing to do but fail the fctx.
-                                */
                                FCTX_ATTR_CLR(fctx, FCTX_ATTR_ADDRWAIT);
-                               want_done = true;
+                               if (!ISC_LIST_EMPTY(fctx->res->alternates)) {
+                                       want_try = true;
+                               } else {
+                                       /*
+                                        * We've got nothing else to wait for
+                                        * and don't know the answer.  There's
+                                        * nothing to do but fail the fctx.
+                                        */
+                                       want_done = true;
+                               }
                        }
                }
        }