------------------------------------------------------------ revno: 10072 revision-id: amosjeffries@squid-cache.org-20100823022451-agth132qibh2zqij parent: amosjeffries@squid-cache.org-20100819022734-i2z1a0nk85gc7mrj committer: Amos Jeffries branch nick: SQUID_3_1 timestamp: Sun 2010-08-22 20:24:51 -0600 message: Author: Stephen Thorne Bug 3021: Large DNS reply causes crash when no ipv6 resolver present ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: amosjeffries@squid-cache.org-20100823022451-\ # agth132qibh2zqij # target_branch: http://www.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: bda3dc76450383081aa6cb18a4d9ed437a216fc8 # timestamp: 2010-08-23 02:42:29 +0000 # source_branch: http://www.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_1 # base_revision_id: amosjeffries@squid-cache.org-20100819022734-\ # i2z1a0nk85gc7mrj # # Begin patch === modified file 'src/dns_internal.cc' --- src/dns_internal.cc 2010-08-11 11:16:41 +0000 +++ src/dns_internal.cc 2010-08-23 02:24:51 +0000 @@ -843,14 +843,16 @@ } 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++;