From 65c8d505ebba4f9ad555d713b17e35218b10e9e7 Mon Sep 17 00:00:00 2001 From: "Kevin L. Mitchell" Date: Thu, 12 Jul 2001 15:29:34 +0000 Subject: [PATCH] Author: Kev Log message: IPcheck sucks large, hairy rocks. In this case, local clients were not getting FLAGS_IPCHECK set, so the connected count in the IP registry was not getting decremented when they exited. Moreover, IPcheck_remote_connect set this bit itself, but IPcheck_local_connect cannot because the client doesn't even exist yet. This means that the bit has to be set in s_bsd.c. This is pretty darned annoying, but what else can one do? This should at least fix one problem we've been having with the IPcheck code. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@530 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 7 +++++++ ircd/IPcheck.c | 1 - ircd/s_bsd.c | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1e71a8a..2a94cfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-07-12 Kevin L. Mitchell + + * ircd/s_bsd.c: mark a client as having been IP checked + + * ircd/IPcheck.c (ip_registry_check_remote): remove unneeded + second call to SetIPChecked() + 2001-07-11 Kevin L. Mitchell * ircd/engine_poll.c: deal with POLLHUP properly (hopefully) diff --git a/ircd/IPcheck.c b/ircd/IPcheck.c index cabeaef..050ea0d 100644 --- a/ircd/IPcheck.c +++ b/ircd/IPcheck.c @@ -318,7 +318,6 @@ int ip_registry_check_remote(struct Client* cptr, int is_burst) entry->last_connect = NOW; } } - SetIPChecked(cptr); return 1; } diff --git a/ircd/s_bsd.c b/ircd/s_bsd.c index 459c9d3..049691c 100644 --- a/ircd/s_bsd.c +++ b/ircd/s_bsd.c @@ -628,6 +628,7 @@ void add_connection(struct Listener* listener, int fd) { * 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), (const char*) &addr.sin_addr); strcpy(cli_sockhost(new_client), cli_sock_ip(new_client)); (cli_ip(new_client)).s_addr = addr.sin_addr.s_addr; -- 2.20.1