Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2006-02-16 04:04:35 UTC
Modified files:
Tag: u2_10_12_branch
ChangeLog include/res.h ircd/ircd_res.c tools/iauth-test
Log message:
Handle NXDOMAIN DNS errors.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.71 ircu2.10/ChangeLog:1.710.2.72
--- ircu2.10/ChangeLog:1.710.2.71 Wed Feb 15 19:49:54 2006
+++ ircu2.10/ChangeLog Wed Feb 15 20:04:24 2006
@@ -1,5 +1,14 @@
2006-02-15 Michael Poole <[EMAIL PROTECTED]>
+ * include/res.h (NXDOMAIN): Define.
+
+ * ircd/ircd_res.c (res_readreply): Treat NXDOMAIN just like
+ SERVFAIL. Patch courtesy of Dianora.
+
+ * tools/iauth-test (Carp): This doesn't actually use Carp.
+
+2006-02-15 Michael Poole <[EMAIL PROTECTED]>
+
* doc/example.conf: Include new HIS_STATS_IAUTH feature.
* doc/readme.features: Document the feature.
Index: ircu2.10/include/res.h
diff -u ircu2.10/include/res.h:1.17 ircu2.10/include/res.h:1.17.2.1
--- ircu2.10/include/res.h:1.17 Mon Jun 27 06:25:51 2005
+++ ircu2.10/include/res.h Wed Feb 15 20:04:25 2006
@@ -1,6 +1,6 @@
/** @file
* @brief IRC resolver API.
- * @version $Id: res.h,v 1.17 2005/06/27 13:25:51 entrope Exp $
+ * @version $Id: res.h,v 1.17.2.1 2006/02/16 04:04:25 entrope Exp $
*/
#ifndef INCLUDED_res_h
@@ -45,6 +45,7 @@
#define QUERY 0 /**< Forward (normal) DNS query operation. */
#define NO_ERRORS 0 /**< No errors processing a query. */
#define SERVFAIL 2 /**< Server error while processing a query. */
+#define NXDOMAIN 3 /**< Domain name in query does not exist. */
#define T_A 1 /**< Hostname -> IPv4 query type. */
#define T_AAAA 28 /**< Hostname -> IPv6 query type. */
#define T_PTR 12 /**< IP(v4 or v6) -> hostname query type. */
Index: ircu2.10/ircd/ircd_res.c
diff -u ircu2.10/ircd/ircd_res.c:1.23.2.2 ircu2.10/ircd/ircd_res.c:1.23.2.3
--- ircu2.10/ircd/ircd_res.c:1.23.2.2 Sat Nov 12 11:32:26 2005
+++ ircu2.10/ircd/ircd_res.c Wed Feb 15 20:04:25 2006
@@ -18,7 +18,7 @@
*/
/** @file
* @brief IRC resolver functions.
- * @version $Id: ircd_res.c,v 1.23.2.2 2005/11/12 19:32:26 entrope Exp $
+ * @version $Id: ircd_res.c,v 1.23.2.3 2006/02/16 04:04:25 entrope Exp $
*/
#include "client.h"
@@ -784,7 +784,7 @@
if ((header->rcode != NO_ERRORS) || (header->ancount == 0))
{
- if (SERVFAIL == header->rcode)
+ if (SERVFAIL == header->rcode || NXDOMAIN == header->rcode)
{
/*
* If a bad error was returned, we stop here and don't send
Index: ircu2.10/tools/iauth-test
diff -u ircu2.10/tools/iauth-test:1.1.2.1 ircu2.10/tools/iauth-test:1.1.2.2
--- ircu2.10/tools/iauth-test:1.1.2.1 Wed Feb 15 19:49:55 2006
+++ ircu2.10/tools/iauth-test Wed Feb 15 20:04:25 2006
@@ -11,7 +11,6 @@
use warnings;
use vars qw(%pending);
-use Carp; # for carp
use Config; # for $Config{sig_name} and $Config{sig_num}
use FileHandle; # for autoflush method on file handles
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches