Re: Frequent ERR_DNS_FAIL in Squid 1.1.beta19

From: Duane Wessels <wessels>
Date: Thu, 14 Nov 96 10:13:09 -0800

Lars.Slettjord@cc.uit.no writes:

>Hi
>
>I just upgraded from Squid-1.1beta5 to Squid-1.1beta19 and the rate of
>ERR_DNS_FAIL went straight up. I went from having 150-300 ERR_DNS_FAIL
>per day to 40 in 5 minutes (about 11000 per day). I downgraded the
>dnsserver to version 1.1beta5 (only the dnsserver), and the problem
>dissapeared.
>
>Apart from this 1.1beta19 seems to be stable under IRIX 5.3 on a
>Challenge S (well, I've only used it for about one hour yet).

Here's the diff for dnsserver.c between beta5 and beta19:

@@ -221,7 +221,16 @@
 extern int _dns_ttl_; /* this is a really *dirty* hack - bne */
 #endif
 
-int do_debug = 0;
+#ifdef _SQUID_NEXT_
+/* This is a really bloody hack. frank@langen.bull.de
+ * Workaround bug in gethostbyname which sets h_errno wrong
+ * WARNING: This hack queries only the resolver and not NetInfo or YP
+ */
+struct hostent *_res_gethostbyname(char *name);
+#define gethostbyname _res_gethostbyname
+#endif /* _SQUID_NEXT_ */
+
+static int do_debug = 0;
 
 /* error messages from gethostbyname() */
 static char *
@@ -244,7 +253,7 @@
 {
     char request[256];
     char msg[256];
- struct hostent *result = NULL;
+ const struct hostent *result = NULL;
     FILE *logfile = NULL;
     long start;
     long stop;
@@ -254,7 +263,6 @@
     int alias_count = 0;
     int i;
     int c;
- extern char *optarg;
 
 #if HAVE_RES_INIT
     res_init();
@@ -287,7 +295,7 @@
        }
     }
 
- while (1) {
+ for (;;) {
        int retry_count = 0;
        int addrbuf;
        memset(request, '\0', 256);

So the only serious change is bracketed by "#ifdef _SQUID_NEXT_"

I don't suppose you've recently changed libresolv as well?

Duane W.
Received on Thu Nov 14 1996 - 10:13:09 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:33 MST