From be9a30092ec8aadab2d6aaa23f4155d6e1400101 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 22 Aug 2010 20:24:51 -0600 Subject: [PATCH] Author: Stephen Thorne Bug 3021: Large DNS reply causes crash when no ipv6 resolver present --- src/dns_internal.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 471d94d184..271dee0b9a 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -843,14 +843,16 @@ idnsSendQuery(idns_query * q) } while ( (x<0 && y<0) && q->nsends % nns != 0); - if (y >= 0) { - fd_bytes(DnsSocketB, y, FD_WRITE); - commSetSelect(DnsSocketB, COMM_SELECT_READ, idnsRead, NULL, 0); - } + if (!q->need_vc) { + if (y >= 0) { + fd_bytes(DnsSocketB, y, FD_WRITE); + commSetSelect(DnsSocketB, COMM_SELECT_READ, idnsRead, NULL, 0); + } - if (x >= 0) { - fd_bytes(DnsSocketA, x, FD_WRITE); - commSetSelect(DnsSocketA, COMM_SELECT_READ, idnsRead, NULL, 0); + if (x >= 0) { + fd_bytes(DnsSocketA, x, FD_WRITE); + commSetSelect(DnsSocketA, COMM_SELECT_READ, idnsRead, NULL, 0); + } } nameservers[ns].nqueries++; -- 2.47.2