From: Amos Jeffries Date: Mon, 23 Aug 2010 02:24:51 +0000 (-0600) Subject: Author: Stephen Thorne X-Git-Tag: SQUID_3_1_7~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=be9a30092ec8aadab2d6aaa23f4155d6e1400101;p=thirdparty%2Fsquid.git Author: Stephen Thorne Bug 3021: Large DNS reply causes crash when no ipv6 resolver present --- 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++;