diff options
author | Christian Goetze <cg@lindenlab.com> | 2008-10-01 00:42:47 +0000 |
---|---|---|
committer | Christian Goetze <cg@lindenlab.com> | 2008-10-01 00:42:47 +0000 |
commit | b069bb9e71d31495f3f1312529d19fdb83c1779e (patch) | |
tree | cf7575a0025224c1f9b93a47a9879d9b280a5299 /indra/llmessage/message.cpp | |
parent | d725e5b24075b2171f8a5b263969991e9b475078 (diff) |
svn merge -r96886:98039 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-24-Server --> release
Diffstat (limited to 'indra/llmessage/message.cpp')
-rw-r--r-- | indra/llmessage/message.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 290682f7ce..abd9467602 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -754,7 +754,15 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) clearReceiveState(); valid_packet = FALSE; } - + if( valid_packet && mTemplateMessageReader->isUdpBanned()) + { + llwarns << "Received UDP black listed message " + << mTemplateMessageReader->getMessageName() + << " from " << host << llendl; + clearReceiveState(); + valid_packet = FALSE; + } + if( valid_packet ) { logValidMsg(cdp, host, recv_reliable, recv_resent, (BOOL)(acks>0) ); @@ -4013,3 +4021,18 @@ bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump) http_pump->callback(); return (mPacketsIn - packetsIn) > 0; } + +void LLMessageSystem::banUdpMessage(const std::string& name) +{ + message_template_name_map_t::iterator itt = mMessageTemplates.find( + LLMessageStringTable::getInstance()->getString(name.c_str()) + ); + if(itt != mMessageTemplates.end()) + { + itt->second->banUdp(); + } + else + { + llwarns << "Attempted to ban an unknown message: " << name << "." << llendl; + } +} |