Committer : decampos
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-10-17 17:17:06 UTC
Modified files:
ChangeLog ircd/ircd_res.c
Log message:
Author: Diane Bruce <[EMAIL PROTECTED]> (by way of Vampire- <[EMAIL PROTECTED]>)
Log message:
ircd_res.c would send out hundreds? of retry requests on clients that
did not resolve, i.e. SERVFAIL. The code was essentailly ignoring
SERVFAIL hence generating request after request after request.
This appears to fix this major bug.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.725 ircu2.10/ChangeLog:1.726
--- ircu2.10/ChangeLog:1.725 Wed Oct 12 16:52:12 2005
+++ ircu2.10/ChangeLog Mon Oct 17 10:16:56 2005
@@ -1,3 +1,9 @@
+2005-10-17 Diane Bruce <[EMAIL PROTECTED]>
+
+ * ircd/ircd_res.c: Don't send retries if the client did
+ not resolve (SERVFAIL); this fixes a bug causing a flurry
+ of retries in this case
+
2005-10-12 Michael Poole <[EMAIL PROTECTED]>
* doc/example.conf: Update documentation to match this change.
Index: ircu2.10/ircd/ircd_res.c
diff -u ircu2.10/ircd/ircd_res.c:1.23 ircu2.10/ircd/ircd_res.c:1.24
--- ircu2.10/ircd/ircd_res.c:1.23 Mon Jun 27 06:25:51 2005
+++ ircu2.10/ircd/ircd_res.c Mon Oct 17 10:16:56 2005
@@ -18,7 +18,7 @@
*/
/** @file
* @brief IRC resolver functions.
- * @version $Id: ircd_res.c,v 1.23 2005/06/27 13:25:51 entrope Exp $
+ * @version $Id: ircd_res.c,v 1.24 2005/10/17 17:16:56 decampos Exp $
*/
#include "client.h"
@@ -788,7 +788,15 @@
if ((header->rcode != NO_ERRORS) || (header->ancount == 0))
{
if (SERVFAIL == header->rcode)
- resend_query(request);
+ {
+ /*
+ * If a bad error was returned, we stop here and don't send
+ * send any more (no retries granted).
+ */
+ Debug((DEBUG_DNS, "Request %p has bad response (state %d type %d rcode
%d)", request, request->state, request->type, header->rcode));
+ (*request->callback)(request->callback_ctx, NULL, NULL);
+ rem_request(request);
+ }
else
{
/*
@@ -808,16 +816,6 @@
request->timeout += feature_int(FEAT_IRCD_RES_TIMEOUT);
resend_query(request);
}
- else
- {
- /*
- * If a bad error was returned, we stop here and don't send
- * send any more (no retries granted).
- */
- Debug((DEBUG_DNS, "Request %p has bad response (state %d type %d rcode
%d)", request, request->state, request->type, header->rcode));
- (*request->callback)(request->callback_ctx, NULL, NULL);
- rem_request(request);
- }
}
return;
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches