Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-06-28 00:42:17 UTC
Modified files:
ChangeLog ircd/s_bsd.c ircd/s_serv.c
Log message:
Never count servers in IPcheck.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.655 ircu2.10/ChangeLog:1.656
--- ircu2.10/ChangeLog:1.655 Mon Jun 27 06:25:49 2005
+++ ircu2.10/ChangeLog Mon Jun 27 17:42:05 2005
@@ -1,5 +1,13 @@
2005-06-27 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/s_bsd.c (add_connection): Split logic for server versus
+ client listeners; only do IPcheck for client connections.
+
+ * ircd/s_serv.c (server_estab): There is no longer a need to
+ remove IPcheck reference, so don't.
+
+2005-06-27 Michael Poole <[EMAIL PROTECTED]>
+
* include/client.h (struct Connection): Remove con_dns_reply (and
associated macros).
Index: ircu2.10/ircd/s_bsd.c
diff -u ircu2.10/ircd/s_bsd.c:1.78 ircu2.10/ircd/s_bsd.c:1.79
--- ircu2.10/ircd/s_bsd.c:1.78 Mon Jun 27 06:25:52 2005
+++ ircu2.10/ircd/s_bsd.c Mon Jun 27 17:42:06 2005
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Functions that now (or in the past) relied on BSD APIs.
- * @version $Id: s_bsd.c,v 1.78 2005/06/27 13:25:52 entrope Exp $
+ * @version $Id: s_bsd.c,v 1.79 2005/06/28 00:42:06 entrope Exp $
*/
#include "config.h"
@@ -518,27 +518,32 @@
*/
os_disable_options(fd);
- /*
- * Add this local client to the IPcheck registry.
- *
- * If they're throttled, murder them, but tell them why first.
- */
- if (!IPcheck_local_connect(&addr.addr, &next_target) && !listener->server)
+ if (listener->server)
{
- ++ServerStats->is_ref;
- write(fd, throttle_message, strlen(throttle_message));
- close(fd);
- return;
+ new_client = make_client(0, STAT_UNKNOWN_SERVER);
+ }
+ else
+ {
+ /*
+ * Add this local client to the IPcheck registry.
+ *
+ * If they're throttled, murder them, but tell them why first.
+ */
+ if (!IPcheck_local_connect(&addr.addr, &next_target))
+ {
+ ++ServerStats->is_ref;
+ write(fd, throttle_message, strlen(throttle_message));
+ close(fd);
+ return;
+ }
+ new_client = make_client(0, STAT_UNKNOWN_USER);
+ SetIPChecked(new_client);
}
-
- new_client = make_client(0, ((listener->server) ?
- STAT_UNKNOWN_SERVER : STAT_UNKNOWN_USER));
/*
* Copy ascii address to 'sockhost' just in case. Then we have something
* valid to put into error messages...
*/
- SetIPChecked(new_client);
ircd_ntoa_r(cli_sock_ip(new_client), &addr.addr);
strcpy(cli_sockhost(new_client), cli_sock_ip(new_client));
memcpy(&cli_ip(new_client), &addr.addr, sizeof(cli_ip(new_client)));
Index: ircu2.10/ircd/s_serv.c
diff -u ircu2.10/ircd/s_serv.c:1.39 ircu2.10/ircd/s_serv.c:1.40
--- ircu2.10/ircd/s_serv.c:1.39 Mon Jun 27 06:25:52 2005
+++ ircu2.10/ircd/s_serv.c Mon Jun 27 17:42:06 2005
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Miscellaneous server support functions.
- * @version $Id: s_serv.c,v 1.39 2005/06/27 13:25:52 entrope Exp $
+ * @version $Id: s_serv.c,v 1.40 2005/06/28 00:42:06 entrope Exp $
*/
#include "config.h"
@@ -133,12 +133,6 @@
cli_serv(cptr)->timestamp, MAJOR_PROTOCOL, NumServCap(&me),
feature_bool(FEAT_HUB) ? "h" : "",
*(cli_info(&me)) ? cli_info(&me) : "IRCers United");
- /*
- * Don't charge this IP# for connecting
- * XXX - if this comes from a server port, it will not have been added
- * to the IP check registry, see add_connection in s_bsd.c
- */
- IPcheck_connect_fail(cptr);
}
det_confs_butmask(cptr, CONF_SERVER | CONF_UWORLD);
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches