From 723cac034bd38b3b394efc80e7a875c9204fc398 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 14 Jan 2024 11:41:01 -0600 Subject: [PATCH] Discard unencrypted packets on encrypted control stream --- src/ControlStream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ControlStream.c b/src/ControlStream.c index 43ef153..dc4ba4e 100644 --- a/src/ControlStream.c +++ b/src/ControlStream.c @@ -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 {