]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Stephen Thorne <stephen@thorne.id.au>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Mon, 23 Aug 2010 02:24:51 +0000 (20:24 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Mon, 23 Aug 2010 02:24:51 +0000 (20:24 -0600)
Bug 3021: Large DNS reply causes crash when no ipv6 resolver present

src/dns_internal.cc

index 471d94d184b9c7e073db69628220e3c7c77773fb..271dee0b9ab3539e2e17f134ce19b9e8a09ac764 100644 (file)
@@ -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++;