From 72bff83b6375ce0ad73ce6d3fa79c2dd8f57881b Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 10 May 2021 15:35:28 +0100 Subject: [PATCH] check if MME-UE-S1AP-ID has been yet assigned before sending UL NAS Transport. If it hasn't log error and abort s1 tx. --- srsenb/src/stack/upper/s1ap.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srsenb/src/stack/upper/s1ap.cc b/srsenb/src/stack/upper/s1ap.cc index fc9becfd7..cfbc933f8 100644 --- a/srsenb/src/stack/upper/s1ap.cc +++ b/srsenb/src/stack/upper/s1ap.cc @@ -1385,7 +1385,8 @@ bool s1ap::ue::send_initialuemessage(asn1::s1ap::rrc_establishment_cause_e cause bool s1ap::ue::send_ulnastransport(srsran::unique_byte_buffer_t pdu) { - if (not s1ap_ptr->mme_connected) { + if (not ctxt.mme_ue_s1ap_id.has_value()) { + logger.error("Trying to send UL NAS Transport message for rnti=0x%x without MME-S1AP-UE-ID", ctxt.rnti); return false; }