+2005-06-27 Michael Poole <mdpoole@troilus.org>
+
+ * 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 <mdpoole@troilus.org>
* include/client.h (struct Connection): Remove con_dns_reply (and
*/
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)));
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);