This patch makes Squid log the DNS failure if it fails to connect to
a DNS server over TCP. TCP is required if the DNS response do not fit
within the small DNS UDP packet size (ca 0.5kb).
This patch apparently do not solve the segmentation fault, but at least
logs the condition properly.
nsvc * vc = (nsvc *)data;
if (status != COMM_OK) {
+ debugs(78, 1, "idnsInitVCConnected: Failed to connect to nameserver " << inet_ntoa(nameservers[vc->ns].S.sin_addr) << " using TCP!");
comm_close(fd);
return;
}
nsvc *vc = cbdataAlloc(nsvc);
nameservers[ns].vc = vc;
+ vc->ns = ns;
IPAddress addr;
nsvc *vc = nameservers[ns].vc;
+ if (!vc) {
+ debugs(78, 1, "idnsSendQuery: Failed to initiate TCP connection to nameserver " << inet_ntoa(nameservers[vc->ns].S.sin_addr) << "!");
+
+ return;
+ }
+
vc->queue->reset();
short head = htons(q->sz);