1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-30 01:06:38 +02:00

UnrealIRCd was ignoring set::ident::read-timeout and using

set::ident::connect-timeout for the read timeout also.
This could lead to failed ident lookups on higher latency connections
because it only gave 3 seconds for the entire ident lookup rather than
the (max) 10 seconds that was intended.
Now both values are properly obeyed (3 for connect, 7 for read
timeouts, by default).
This commit is contained in:
Bram Matthys
2020-04-12 17:46:23 +02:00
parent a992b30a6a
commit c5ba66fbf6
+14 -2
View File
@@ -63,8 +63,20 @@ static EVENT(check_ident_timeout)
list_for_each_entry_safe(client, next, &unknown_list, lclient_node)
{
if (IsIdentLookup(client) && ((TStime() - client->local->firsttime) > IDENT_CONNECT_TIMEOUT))
ident_lookup_failed(client);
if (IsIdentLookup(client))
{
if (IsIdentLookupSent(client))
{
/* set::ident::connect-timeout */
if ((TStime() - client->local->firsttime) > IDENT_CONNECT_TIMEOUT)
ident_lookup_failed(client);
} else
{
/* set::ident::read-timeout */
if ((TStime() - client->local->firsttime) > IDENT_READ_TIMEOUT)
ident_lookup_failed(client);
}
}
}
}