mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
RT #235: attempts to send a reqeust over IPv6 on systems
that do not support IPv6 caused an assertion failure
This commit is contained in:
parent
771218f9ca
commit
99a9da7941
@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: request.c,v 1.32 2000/08/11 16:47:33 gson Exp $ */
|
||||
/* $Id: request.c,v 1.33 2000/08/14 19:31:49 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -525,19 +525,23 @@ dns_request_create(dns_requestmgr_t *requestmgr, dns_message_t *message,
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
} else {
|
||||
dns_dispatch_t *disp = NULL;
|
||||
switch (isc_sockaddr_pf(address)) {
|
||||
case PF_INET:
|
||||
dns_dispatch_attach(requestmgr->dispatchv4,
|
||||
&request->dispatch);
|
||||
disp = requestmgr->dispatchv4;
|
||||
break;
|
||||
case PF_INET6:
|
||||
dns_dispatch_attach(requestmgr->dispatchv6,
|
||||
&request->dispatch);
|
||||
disp = requestmgr->dispatchv6;
|
||||
break;
|
||||
default:
|
||||
result = ISC_R_NOTIMPLEMENTED;
|
||||
goto cleanup;
|
||||
}
|
||||
if (disp == NULL) {
|
||||
result = ISC_R_NETUNREACH;
|
||||
goto cleanup;
|
||||
}
|
||||
dns_dispatch_attach(disp, &request->dispatch);
|
||||
}
|
||||
socket = dns_dispatch_getsocket(request->dispatch);
|
||||
INSIST(socket != NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user