Fix ping timeout handling for outbound server connections.
authorMichael Poole <mdpoole@troilus.org>
Thu, 8 Jun 2006 01:58:36 +0000 (01:58 +0000)
committerMichael Poole <mdpoole@troilus.org>
Thu, 8 Jun 2006 01:58:36 +0000 (01:58 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1663 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/s_auth.c

index ba8916516b413617e958438228bfe4689fadfeff..b6b666f34b0bf790e789b87280aeadcec97843a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-07  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/s_auth.c (auth_ping_timeout): If the client never had an
+       auth request, kill them on ping timeout.
+
 2006-06-05  Michael Poole <mdpoole@troilus.org>
 
        * ircd/s_auth.c (auth_timeout_callback): Clear AR_DNS_PENDING when
index 33e2242db5e6350ec5f68ce1fc6b70de68637d2f..d512b63f11d7a789febd5e6c6b00b8a15d49e17e 100644 (file)
@@ -733,6 +733,11 @@ int auth_ping_timeout(struct Client *cptr)
 
   auth = cli_auth(cptr);
 
+  /* Check whether the auth request is gone (more likely, it never
+   * existed, as in an outbound server connection). */
+  if (!auth)
+      return exit_client_msg(cptr, cptr, &me, "Registration Timeout");
+
   /* Check for a user-controlled timeout. */
   for (flag = 0; flag <= AR_LAST_SCAN; ++flag) {
     if (FlagHas(&auth->flags, flag)) {