Fix: on release command, search attach list

When the RA procedure fails at Msg4, we trigger UL failure and send a
message to the CU to request release. There was a bug in that upon the
ensueing release command, we did not search in the attach list (only
connected list). However, the UE failing at Msg4 does not have
transitioned to the connected list yet, thus not freeing the context.

Fixes: 8f62baefa6 ("Use list of UEs during RA instead of array of RA
  processes)"
This commit is contained in:
Robert Schmidt
2025-07-04 09:40:26 +02:00
parent 2ea3ab5050
commit b6a33777b9
@@ -906,6 +906,7 @@ void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd)
gNB_MAC_INST *mac = RC.nrmac[0];
NR_SCHED_LOCK(&mac->sched_lock);
NR_UE_info_t *UE = find_nr_UE(&mac->UE_info, cmd->gNB_DU_ue_id);
UE = UE ? UE : find_ra_UE(&mac->UE_info, cmd->gNB_DU_ue_id);
if (UE == NULL) {
NR_SCHED_UNLOCK(&mac->sched_lock);
f1ap_ue_context_release_complete_t complete = {