1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 23:26:32 +09:00

Fix for possible race condition resulting in duplicate message recycling

Fix for DoS vulnerability with incoming acks
This commit is contained in:
lidgren
2014-08-10 18:46:26 +00:00
parent 54ff6f1c37
commit 092bd4d536
2 changed files with 5 additions and 3 deletions

View File

@@ -234,8 +234,11 @@ namespace Lidgren.Network
{
//m_peer.LogVerbose("Received ack for " + acktp + "#" + seqNr);
NetSenderChannelBase chan = m_sendChannels[(int)incAck.Item1 - 1];
// If we haven't sent a message on this channel there is no reason to ack it
if (chan == null)
chan = CreateSenderChannel(incAck.Item1);
continue;
chan.ReceiveAcknowledge(now, incAck.Item2);
}
}