]> 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 01:11:56 +0000 (19:11 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Mon, 23 Aug 2010 01:11:56 +0000 (19:11 -0600)
Bug 3021: Large DNS reply causes crash when no ipv6 resolver present

src/dns_internal.cc

index ce0c5bd6f25c93019831c4c94d16c26f24f98725..f31609168cff4241b2819046cbab3eaed6f63384 100644 (file)
@@ -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++;