Discard unencrypted packets on encrypted control stream

This commit is contained in:
Cameron Gutman 2024-01-14 11:41:01 -06:00
parent 6e9ed871bc
commit 723cac034b

View File

@ -1119,10 +1119,10 @@ static void controlReceiveThreadFunc(void* context) {
ctlHdr->type = LE16(ctlHdr->type);
}
else {
// What do we do here???
LC_ASSERT_VT(false);
packetLength = (int)event.packet->dataLength;
event.packet->data = NULL;
Limelog("Discarding unencrypted packet on encrypted control stream: %04x\n", ctlHdr->type);
enet_packet_destroy(event.packet);
continue;
}
}
else {