]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1563. [bug] Gracefully fail when unable to obtain neither a IPv4
authorMark Andrews <marka@isc.org>
Mon, 26 Jan 2004 23:44:12 +0000 (23:44 +0000)
committerMark Andrews <marka@isc.org>
Mon, 26 Jan 2004 23:44:12 +0000 (23:44 +0000)
                        or a IPv6 dispatch. [RT #10230]

CHANGES
bin/named/server.c

diff --git a/CHANGES b/CHANGES
index 1a3f88ba7072397a7cc75001cae19cb2f2ebcd7f..155c976cb277cac6a704a17eb90f360955ba3614 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1563.  [bug]           Gracefully fail when unable to obtain neither a IPv4
+                       or a IPv6 dispatch. [RT #10230]
+
 1562.  [bug]           isc_socket_create() and isc_socket_accept() could
                        leak memory under error conditions. [RT #10230]
 
index 3e885dd08f5977e7446a0d07f1ea7a8667605550..5ce5696069157af557ecdfb994282068e5e91e36 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: server.c,v 1.408 2004/01/14 02:06:49 marka Exp $ */
+/* $Id: server.c,v 1.409 2004/01/26 23:44:12 marka Exp $ */
 
 #include <config.h>
 
@@ -799,6 +799,13 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
         */
        CHECK(get_view_querysource_dispatch(maps, AF_INET, &dispatch4));
        CHECK(get_view_querysource_dispatch(maps, AF_INET6, &dispatch6));
+       if (dispatch4 == NULL && dispatch6 == NULL) {
+               UNEXPECTED_ERROR(__FILE__, __LINE__,
+                                "unable to obtain neither a IPv4 or"
+                                " a IPv6 dispatch");
+               result = ISC_R_UNEXPECTED;
+               goto cleanup;
+       }
        CHECK(dns_view_createresolver(view, ns_g_taskmgr, 31,
                                      ns_g_socketmgr, ns_g_timermgr,
                                      0, ns_g_dispatchmgr,