Add report unknown packets in the error log and close this packets.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-03-11 15:09:51 +03:00
parent 4c7e599802
commit d8db56ec48
+5 -1
View File
@@ -261,11 +261,15 @@ void AuthSocket::OnRead()
} }
} }
///- Report unknown commands in the debug log // Report unknown packets in the error log
if (i == AUTH_TOTAL_COMMANDS) if (i == AUTH_TOTAL_COMMANDS)
{
sLog.outError("[Auth] got unknown packet from '%s'", socket().get_remote_address().c_str());
socket().shutdown();
return; return;
} }
} }
}
/// Make the SRP6 calculation from hash in dB /// Make the SRP6 calculation from hash in dB
void AuthSocket::_SetVSFields(const std::string& rI) void AuthSocket::_SetVSFields(const std::string& rI)