changeset 150:a23ef169d322

limit dns resolver timeouts and retry interval
author carl
date Tue, 27 Mar 2007 15:22:07 -0700
parents 9581f6e62574
children 0e8ec3c483ce
files ChangeLog NEWS configure.in src/dnsbl.cpp
diffstat 4 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Feb 19 15:57:24 2007 -0800
+++ b/ChangeLog	Tue Mar 27 15:22:07 2007 -0700
@@ -1,5 +1,8 @@
     $Id$
 
+5.28 2007-03-27
+    Limit dns resolver to two retries five seconds apart.
+
 5.28 2007-02-19
     Change the conflict resolution algorithm to "second one wins" if we
     have two contexts that both define env_to user@.  Update ICANN tld
--- a/NEWS	Mon Feb 19 15:57:24 2007 -0800
+++ b/NEWS	Tue Mar 27 15:22:07 2007 -0700
@@ -1,5 +1,6 @@
     $Id$
 
+5.29 2007-03-27 Limit dns resolver to two retries five seconds apart.
 5.28 2007-02-19 Change conflict resolution to "second context wins". Update ICANN tld list,
 5.27 2007-01-30 Allow 'inherit' as an env_from target.
 5.26 2006-12-04 Fix bug at 5.23 that prevented seeing host names in the mail bodies
--- a/configure.in	Mon Feb 19 15:57:24 2007 -0800
+++ b/configure.in	Tue Mar 27 15:22:07 2007 -0700
@@ -1,6 +1,6 @@
 
 AC_PREREQ(2.59)
-AC_INIT(dnsbl,5.28,carl@five-ten-sg.com)
+AC_INIT(dnsbl,5.29,carl@five-ten-sg.com)
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADER([config.h])
 
--- a/src/dnsbl.cpp	Mon Feb 19 15:57:24 2007 -0800
+++ b/src/dnsbl.cpp	Tue Mar 27 15:22:07 2007 -0700
@@ -478,6 +478,9 @@
 			snprintf(text, sizeof(text), "process_resolver_requests() has a question %s", question);
 			my_syslog(text);
 		#endif
+		if ((_res.options & RES_INIT) == 0) res_init();
+		_res.retry	 = 2;
+		_res.retrans = RES_TIMEOUT;
 		glom.length = res_search(question, ns_c_in, ns_t_a, glom.answer, sizeof(glom.answer));
 		if (glom.length < 0) glom.length = 0;	// represent all errors as zero length answers
 #else