From d0a284c68368f5cd58309293e936f82e032f7ae8 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Thu, 24 Apr 2014 20:27:03 -0400 Subject: [PATCH] iauth: Send an empty "u" message on ident lookup failure. Otherwise an iauthd might wait indefinitely (i.e. too long) before trying to make a decision on the client. --- doc/readme.iauth | 2 ++ ircd/s_auth.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/doc/readme.iauth b/doc/readme.iauth index 54a011f..1962d9c 100644 --- a/doc/readme.iauth +++ b/doc/readme.iauth @@ -174,12 +174,14 @@ Compatibility: ircd only sends the parameter. u - Client Username Syntax: u +Syntax: u Example: 5 u notbuddha States: REGISTER(1) Next State: - Comments: Indicates a more reliable username for the client. Compatibility: This is an Undernet extension and ircd does not send it. It is enabled by the iauth instance requesting the U policy. + If the identd lookup fails for a user, no username is passed. n - Client Nickname Syntax: n diff --git a/ircd/s_auth.c b/ircd/s_auth.c index ddeabbc..83693a2 100644 --- a/ircd/s_auth.c +++ b/ircd/s_auth.c @@ -679,6 +679,8 @@ static void read_auth_reply(struct AuthRequest* auth) if (IsUserPort(auth->client)) sendheader(auth->client, REPORT_FAIL_ID); ++ServerStats->is_abad; + if (IAuthHas(iauth, IAUTH_UNDERNET)) + sendto_iauth(auth->client, "u"); } else { if (IsUserPort(auth->client)) sendheader(auth->client, REPORT_FIN_ID); -- 2.20.1