From: Amos Jeffries Date: Mon, 23 Aug 2010 01:11:56 +0000 (-0600) Subject: Author: Stephen Thorne X-Git-Tag: take1~348 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e2dd5c6b50257ad656783bf8672a9a30b62c566;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 ce0c5bd6f2..f31609168c 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -842,14 +842,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++;