Add some sanity checking for stream_parser so it's less likely to pickup other protocols as an everquest protocol.

This commit is contained in:
KimLS
2024-10-26 10:03:57 -07:00
parent c1651b7dca
commit b7c93e12de
2 changed files with 34 additions and 17 deletions
@@ -87,6 +87,12 @@ namespace StreamParser.Common.Daybreak
}
else if (data[0] == 0 && data[1] == Opcode.SessionRequest)
{
if(data.Length != 24)
{
_logger.LogTrace("Tossing packet, {0} was not the right size for a SessionRequest", data.Length);
return;
}
c = new Connection(this, srcAddr, srcPort, dstAddr, dstPort);
_connections.Add(c);
c.ProcessPacket(srcAddr, srcPort, packetTime, data);