[AMF] Check if session has been removed already between different events

This fix is needed to prevent AMF crash in case that one of the
neighbouring NF (SMF) crashed in the middle of the procedure.
This commit is contained in:
Bostjan Meglic
2023-01-12 10:12:32 +00:00
committed by Sukchan Lee
parent 456fbfec6f
commit 200414ccca

View File

@@ -693,6 +693,14 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
break;
}
amf_ue = sess->amf_ue;
ogs_assert(amf_ue);
amf_ue = amf_ue_cycle(amf_ue);
if (!amf_ue) {
ogs_error("UE(amf_ue) Context has already been removed");
break;
}
ogs_error("[%d:%d] Cannot receive SBI message",
sess->psi, sess->pti);
if (sess->payload_container_type) {