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); ctlHdr->type = LE16(ctlHdr->type);
} }
else { else {
// What do we do here???
LC_ASSERT_VT(false); LC_ASSERT_VT(false);
packetLength = (int)event.packet->dataLength; Limelog("Discarding unencrypted packet on encrypted control stream: %04x\n", ctlHdr->type);
event.packet->data = NULL; enet_packet_destroy(event.packet);
continue;
} }
} }
else { else {