Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Thu, 12 Jul 2001 15:29:34 +0000 (15:29 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Thu, 12 Jul 2001 15:29:34 +0000 (15:29 +0000)
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
ircd/IPcheck.c
ircd/s_bsd.c

index 1e71a8a8872ea8d957be79e24163072c465c244b..2a94cfdc2bc30e6a04240cf216f9a7bba0dec0f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-07-12  Kevin L. Mitchell  <klmitch@mit.edu>
+
+       * 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  <klmitch@mit.edu>
 
        * ircd/engine_poll.c: deal with POLLHUP properly (hopefully)
index cabeaef9716e3503a664f57f246bd9f74562517e..050ea0dfa0c530ff07ac9e460bb0584368bfb00d 100644 (file)
@@ -318,7 +318,6 @@ int ip_registry_check_remote(struct Client* cptr, int is_burst)
       entry->last_connect = NOW;
     }
   }
-  SetIPChecked(cptr);
   return 1;
 }
 
index 459c9d399c929f2409eb7f158dcf6bd6bf9ad394..049691cb52abf6027b36c5128c4fdaaaf163e4ae 100644 (file)
@@ -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;