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).
nsvc * vc = (nsvc *)data;
if (status != COMM_OK) {
+ char buf[MAX_IPSTRLEN];
+ debugs(78, 1, "idnsInitVCConnected: Failed to connect to nameserver " << nameservers[vc->ns].S.NtoA(buf,MAX_IPSTRLEN) << " 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) {
+ char buf[MAX_IPSTRLEN];
+ debugs(78, 1, "idnsSendQuery: Failed to initiate TCP connection to nameserver " << nameservers[ns].S.NtoA(buf,MAX_IPSTRLEN) << "!");
+
+ return;
+ }
+
vc->queue->reset();
short head = htons(q->sz);