Commit 50e32bdc authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'fix_service_request' into 'develop'

Minor fix to support Service Request

See merge request oai/cn5g/oai-cn5g-amf!80
parents 43624b7f 51a0879b
......@@ -502,7 +502,7 @@ void amf_n1::nas_signalling_establishment_request_handle(
uint32_t ran_ue_ngap_id, long amf_ue_ngap_id, bstring plain_msg,
std::string snn, uint8_t ulCount) {
// Create NAS Context, or Update if existed
if ((nc.get() == nullptr) && (type == PlainNasMsg)) {
if (!nc.get()) {
Logger::amf_n1().debug(
"No existing nas_context with amf_ue_ngap_id 0x%x --> Create a new one",
amf_ue_ngap_id);
......@@ -531,9 +531,9 @@ void amf_n1::nas_signalling_establishment_request_handle(
supi.c_str());
event_sub.ue_reachability_status(supi, CM_CONNECTED, 1);
} else {
// Logger::amf_n1().debug("existing nas_context with amf_ue_ngap_id(0x%x)
// --> Update",amf_ue_ngap_id); nc =
// amf_ue_id_2_nas_context(amf_ue_ngap_id);
Logger::amf_n1().debug(
"Existing nas_context with amf_ue_ngap_id (0x%x)", amf_ue_ngap_id);
// nc = amf_ue_id_2_nas_context(amf_ue_ngap_id);
}
uint8_t* buf = (uint8_t*) bdata(plain_msg);
......@@ -550,6 +550,10 @@ void amf_n1::nas_signalling_establishment_request_handle(
case SERVICE_REQUEST: {
Logger::amf_n1().debug("Received service request message, handling...");
if (!nc.get()) {
Logger::amf_n1().error("No NAS Context found");
return;
}
if (!nc.get()->security_ctx) {
Logger::amf_n1().error("No Security Context found");
return;
......
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