From 7b55d42b11d899456d8e5a153fb097e8691b92e8 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 10 Mar 2019 11:23:38 +0000
Subject: lludp fix max packet size on ack appends
---
OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 6fd782a..2300800 100755
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -256,6 +256,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Maximum transmission unit, or UDP packet size, for the LLUDP protocol
public const int MTU = 1400;
+ public const int MAXPAYLOAD = 1250;
/// Number of forced client logouts due to no receipt of packets before timeout.
public int ClientLogoutsDueToNoReceives { get; protected set; }
@@ -1150,7 +1151,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// no more ACKs to append
int ackCount = 0;
uint ack;
- while (dataLength + 5 < buffer.Data.Length && ackCount < 256 && udpClient.PendingAcks.Dequeue(out ack))
+ while (dataLength + 5 < MTU && ackCount < 256 && udpClient.PendingAcks.Dequeue(out ack))
{
Utils.UIntToBytesBig(ack, buffer.Data, dataLength);
dataLength += 4;
--
cgit v1.1