Pad zero size packets which is what we did on encrypted connections prior to #1464 (#1504)

This commit is contained in:
Chris Miles
2021-08-31 00:33:49 -05:00
committed by GitHub
parent f4bd7c53c0
commit 228e0007ca
2 changed files with 10 additions and 0 deletions
@@ -21,6 +21,11 @@ EQ::Net::ServertalkClient::~ServertalkClient()
void EQ::Net::ServertalkClient::Send(uint16_t opcode, EQ::Net::Packet &p)
{
// pad zero size packets
if (p.Length() == 0) {
p.PutUInt8(0, 0);
}
EQ::Net::DynamicPacket out;
out.PutUInt32(0, p.Length());
out.PutUInt16(4, opcode);
@@ -19,6 +19,11 @@ EQ::Net::ServertalkServerConnection::~ServertalkServerConnection()
void EQ::Net::ServertalkServerConnection::Send(uint16_t opcode, EQ::Net::Packet & p)
{
// pad zero size packets
if (p.Length() == 0) {
p.PutUInt8(0, 0);
}
EQ::Net::DynamicPacket out;
out.PutUInt32(0, p.Length());
out.PutUInt16(4, opcode);