diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 4ab8fd0..ac21805 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -611,11 +611,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
611 | outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; | 611 | outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; |
612 | } | 612 | } |
613 | 613 | ||
614 | protected override void PacketReceived(UDPPacketBuffer buffer) | 614 | public override void PacketReceived(UDPPacketBuffer buffer) |
615 | { | 615 | { |
616 | // Debugging/Profiling | 616 | // Debugging/Profiling |
617 | //try { Thread.CurrentThread.Name = "PacketReceived (" + m_scene.RegionInfo.RegionName + ")"; } | 617 | //try { Thread.CurrentThread.Name = "PacketReceived (" + m_scene.RegionInfo.RegionName + ")"; } |
618 | //catch (Exception) { } | 618 | //catch (Exception) { } |
619 | // m_log.DebugFormat( | ||
620 | // "[LLUDPSERVER]: Packet received from {0} in {1}", buffer.RemoteEndPoint, m_scene.RegionInfo.RegionName); | ||
619 | 621 | ||
620 | LLUDPClient udpClient = null; | 622 | LLUDPClient udpClient = null; |
621 | Packet packet = null; | 623 | Packet packet = null; |
@@ -625,7 +627,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
625 | #region Decoding | 627 | #region Decoding |
626 | 628 | ||
627 | if (buffer.DataLength < 7) | 629 | if (buffer.DataLength < 7) |
630 | { | ||
631 | // m_log.WarnFormat( | ||
632 | // "[LLUDPSERVER]: Dropping undersized packet with {0} bytes received from {1} in {2}", | ||
633 | // buffer.DataLength, buffer.RemoteEndPoint, m_scene.RegionInfo.RegionName); | ||
634 | |||
628 | return; // Drop undersizd packet | 635 | return; // Drop undersizd packet |
636 | } | ||
629 | 637 | ||
630 | int headerLen = 7; | 638 | int headerLen = 7; |
631 | if (buffer.Data[6] == 0xFF) | 639 | if (buffer.Data[6] == 0xFF) |
@@ -637,7 +645,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
637 | } | 645 | } |
638 | 646 | ||
639 | if (buffer.DataLength < headerLen) | 647 | if (buffer.DataLength < headerLen) |
648 | { | ||
649 | // m_log.WarnFormat( | ||
650 | // "[LLUDPSERVER]: Dropping packet with malformed header received from {0} in {1}", | ||
651 | // buffer.RemoteEndPoint, m_scene.RegionInfo.RegionName); | ||
652 | |||
640 | return; // Malformed header | 653 | return; // Malformed header |
654 | } | ||
641 | 655 | ||
642 | try | 656 | try |
643 | { | 657 | { |
@@ -650,6 +664,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
650 | } | 664 | } |
651 | catch (IndexOutOfRangeException) | 665 | catch (IndexOutOfRangeException) |
652 | { | 666 | { |
667 | // m_log.WarnFormat( | ||
668 | // "[LLUDPSERVER]: Dropping short packet received from {0} in {1}", | ||
669 | // buffer.RemoteEndPoint, m_scene.RegionInfo.RegionName); | ||
670 | |||
653 | return; // Drop short packet | 671 | return; // Drop short packet |
654 | } | 672 | } |
655 | catch(Exception e) | 673 | catch(Exception e) |