Core/RA: Fix RA subnegotiation for clients that don't send any subnegotiation data (like telnet) by setting a 1 second time window in which the client can send their packet before the RASocket will begin actual authentication.

Closes #2471
This commit is contained in:
Machiavelli
2011-08-02 01:55:18 +02:00
parent fc52f0846e
commit cb5ba6b3c9

View File

@@ -276,8 +276,9 @@ int RASocket::subnegotiate()
const size_t recv_size = message_block.space();
// Wait a maximum of 1000ms for negotiation packet - not all telnet clients may send it
const ssize_t n = peer().recv(message_block.wr_ptr(),
recv_size);
recv_size, &ACE_Time_Value(1));
if (n <= 0)
return int(n);
@@ -331,11 +332,8 @@ int RASocket::subnegotiate()
int RASocket::svc(void)
{
if (subnegotiate() == -1)
{
sLog->outRemote("Subnegotiation failed!");
return -1;
}
//! Subnegotiation may differ per client - do not react on it
subnegotiate();
if (send("Authentication required\r\n") == -1)
return -1;