Skip to content

Commit

Permalink
[core] Drop noenc packets if RcvKmState is "secured".
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko authored Apr 9, 2024
1 parent c6afa19 commit 3682321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10190,7 +10190,7 @@ int srt::CUDT::handleSocketPacketReception(const vector<CUnit*>& incoming, bool&
#endif
}
}
else if (m_pCryptoControl && m_pCryptoControl->getCryptoMode() == CSrtConfig::CIPHER_MODE_AES_GCM)
else if (m_pCryptoControl && m_pCryptoControl->m_RcvKmState == SRT_KM_S_SECURED)
{
// Unencrypted packets are not allowed.
const int iDropCnt = m_pRcvBuffer->dropMessage(u->m_Packet.getSeqNo(), u->m_Packet.getSeqNo(), SRT_MSGNO_NONE, CRcvBuffer::DROP_EXISTING);
Expand Down

0 comments on commit 3682321

Please sign in to comment.