From b6a33777b91059afad54717e28a154b0329634ab Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 2 Jul 2025 17:57:20 +0200 Subject: [PATCH] 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: 8f62baefa61e ("Use list of UEs during RA instead of array of RA processes)" --- openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c index 5d7642c815..e8e727ff00 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -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 = {