Return error in ul nas transport if AMF ctxt is not available

This commit is contained in:
Bedran Karakoc 2021-10-27 17:43:12 +02:00 committed by Bedran Karakoc
parent a14cc451d0
commit 9943c79c4a
2 changed files with 2 additions and 6 deletions

View File

@ -754,6 +754,7 @@ ngap::ue* ngap::handle_ngapmsg_ue_id(uint32_t gnb_id, uint32_t amf_id)
}
} else {
logger.warning("User associated with gNB ID %d not found", gnb_id);
user_amf_ptr = users.find_ue_amfid(amf_id);
logger.warning("RAN UE NGAP ID=%d not found - discarding message", gnb_id);
if (user_amf_ptr != nullptr) {
@ -763,12 +764,6 @@ ngap::ue* ngap::handle_ngapmsg_ue_id(uint32_t gnb_id, uint32_t amf_id)
send_error_indication(cause, gnb_id, amf_id);
/* if (user_ptr != nullptr) {
rrc->release_ue(user_ptr->ctxt.rnti);
}
if (user_amf_ptr != nullptr and user_amf_ptr != user_ptr) {
rrc->release_ue(user_mme_ptr->ctxt.rnti);
} */
return nullptr;
}

View File

@ -109,6 +109,7 @@ bool ngap::ue::send_ul_nas_transport(srsran::unique_byte_buffer_t pdu)
container.amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value();
} else {
logger.error("Attempting to send UL NAS Transport without AMF context");
return false;
}
// RAN UE NGAP ID