Commit a2081e43 authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Fix Service Request when UE in CM-CONNECTED mode

parent cb751761
This diff is collapsed.
...@@ -926,6 +926,9 @@ class amf_n1 { ...@@ -926,6 +926,9 @@ class amf_n1 {
void service_request_handle( void service_request_handle(
std::shared_ptr<nas_context> nc, const uint32_t ran_ue_ngap_id, std::shared_ptr<nas_context> nc, const uint32_t ran_ue_ngap_id,
const long amf_ue_ngap_id, bstring nas, uint8_t ulCount); const long amf_ue_ngap_id, bstring nas, uint8_t ulCount);
void send_service_reject(std::shared_ptr<nas_context>& nc, uint8_t cause);
/* /*
* Handle Identity Response message * Handle Identity Response message
* @param [const uint32_t] ran_ue_ngap_id: RAN UE NGAP ID * @param [const uint32_t] ran_ue_ngap_id: RAN UE NGAP ID
......
...@@ -1365,6 +1365,11 @@ void amf_n2::handle_itti_message(itti_ue_context_release_complete& itti_msg) { ...@@ -1365,6 +1365,11 @@ void amf_n2::handle_itti_message(itti_ue_context_release_complete& itti_msg) {
} }
if (nc != nullptr) { if (nc != nullptr) {
// Do nothing in case of old NAS Context (Service Request handling)
if (nc->old_amf_ue_ngap_id == INVALID_AMF_UE_NGAP_ID) {
Logger::amf_n2().debug("UE Context Release Complete for the old context");
return;
}
amf_n1_inst->set_5gcm_state(nc, CM_IDLE); amf_n1_inst->set_5gcm_state(nc, CM_IDLE);
// Start/reset the Mobile Reachable Timer // Start/reset the Mobile Reachable Timer
......
...@@ -21,24 +21,28 @@ ...@@ -21,24 +21,28 @@
#include "nas_context.hpp" #include "nas_context.hpp"
#include "amf.hpp"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
nas_context::nas_context() : _5g_he_av(), _5g_av(), kamf(), _5gmm_capability() { nas_context::nas_context() : _5g_he_av(), _5g_av(), kamf(), _5gmm_capability() {
is_imsi_present = false; is_imsi_present = false;
is_auth_vectors_present = false; is_auth_vectors_present = false;
auts = nullptr; auts = nullptr;
ctx_avaliability_ind = false; ctx_avaliability_ind = false;
amf_ue_ngap_id = 0; amf_ue_ngap_id = 0;
ran_ue_ngap_id = 0; ran_ue_ngap_id = 0;
_5gmm_state = {}; old_amf_ue_ngap_id = INVALID_AMF_UE_NGAP_ID;
registration_type = 0; old_ran_ue_ngap_id = 0;
follow_on_req_pending_ind = false; _5gmm_state = {};
ngksi = 0; registration_type = 0;
ue_security_capability = {}; follow_on_req_pending_ind = false;
is_specific_procedure_for_registration_running = false; ngksi = 0;
is_specific_procedure_for_deregistration_running = false; ue_security_capability = {};
is_specific_procedure_for_eCell_inactivity_running = false; is_specific_procedure_for_registration_running = false;
is_common_procedure_for_authentication_running = false; is_specific_procedure_for_deregistration_running = false;
is_common_procedure_for_identification_running = false; is_specific_procedure_for_eCell_inactivity_running = false;
is_common_procedure_for_authentication_running = false;
is_common_procedure_for_identification_running = false;
is_common_procedure_for_security_mode_control_running = false; is_common_procedure_for_security_mode_control_running = false;
is_common_procedure_for_nas_transport_running = false; is_common_procedure_for_nas_transport_running = false;
security_ctx = std::nullopt; security_ctx = std::nullopt;
...@@ -56,6 +60,7 @@ nas_context::nas_context() : _5g_he_av(), _5g_av(), kamf(), _5gmm_capability() { ...@@ -56,6 +60,7 @@ nas_context::nas_context() : _5g_he_av(), _5g_av(), kamf(), _5gmm_capability() {
implicit_deregistration_timer = ITTI_INVALID_TIMER_ID; implicit_deregistration_timer = ITTI_INVALID_TIMER_ID;
href = {}; href = {};
imeisv = std::nullopt; imeisv = std::nullopt;
guti = std::nullopt;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -68,6 +68,9 @@ class nas_context { ...@@ -68,6 +68,9 @@ class nas_context {
bool ctx_avaliability_ind; bool ctx_avaliability_ind;
long amf_ue_ngap_id; long amf_ue_ngap_id;
uint32_t ran_ue_ngap_id; uint32_t ran_ue_ngap_id;
long old_amf_ue_ngap_id;
uint32_t old_ran_ue_ngap_id;
cm_state_t nas_status; cm_state_t nas_status;
_5gmm_state_t _5gmm_state; _5gmm_state_t _5gmm_state;
bool is_mobile_reachable_timer_timeout; bool is_mobile_reachable_timer_timeout;
...@@ -81,6 +84,7 @@ class nas_context { ...@@ -81,6 +84,7 @@ class nas_context {
std::string imsi; // TODO: use SUPI instead std::string imsi; // TODO: use SUPI instead
std::optional<nas::IMEI_IMEISV_t> imeisv; std::optional<nas::IMEI_IMEISV_t> imeisv;
std::optional<std::string> guti;
std::uint8_t _5gmm_capability[13]; std::uint8_t _5gmm_capability[13];
nas::UESecurityCapability ue_security_capability; nas::UESecurityCapability ue_security_capability;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment