From 7286e6283bac5ed5f885e1a871cd3b5577cf42dd Mon Sep 17 00:00:00 2001 From: aligungr Date: Sat, 8 May 2021 16:58:59 +0300 Subject: [PATCH] Protection of initial NAS messages --- src/ue/nas/mm/transport.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/ue/nas/mm/transport.cpp b/src/ue/nas/mm/transport.cpp index 9cdec4b6a..2f88932d9 100644 --- a/src/ue/nas/mm/transport.cpp +++ b/src/ue/nas/mm/transport.cpp @@ -13,9 +13,6 @@ #include #include -// See https://github.com/aligungr/UERANSIM/issues/316 for details about this behaviour. -#define NAS_CONTAINER_NOT_CIPHERED 1 - namespace nr::ue { @@ -129,13 +126,7 @@ void NasMm::sendNasMessage(const nas::PlainMmMessage &msg) if (HasNonCleartext(msg)) { OctetString originalPdu; - -#if NAS_CONTAINER_NOT_CIPHERED nas::EncodeNasMessage(msg, originalPdu); -#else - auto originalSecured = nas_enc::Encrypt(*m_usim->m_currentNsCtx, msg, false); - nas::EncodeNasMessage(*originalSecured, originalPdu); -#endif auto copy = nas::utils::DeepCopyMsg(msg); RemoveCleartextIEs((nas::PlainMmMessage &)*copy, std::move(originalPdu));