diff --git a/CHANGES b/CHANGES index 1a3f88ba70..155c976cb2 100644 --- 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] diff --git a/bin/named/server.c b/bin/named/server.c index 3e885dd08f..5ce5696069 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -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 @@ -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,