From 7e1c3e4213078ee24cd1c73187990f9dde81ca47 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 11 Feb 2025 18:26:22 +0100 Subject: [PATCH] Fix double-E1 bearer context setup req in E1 handler If two PDU sessions are to be setup, the CU-CP sends two bearer context setup requests. When running only the CU-UP, we inconditionally tried to set up the CU-UP UE ID identifiers upon reception of the bearer context setup request, leading to an assert. Check if the IDs are not already set up, to avoid assertions in that case. --- openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c index 96701dbb83..b96d38030c 100644 --- a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c +++ b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c @@ -149,7 +149,7 @@ void e1_bearer_context_setup(const e1ap_bearer_setup_req_t *req) /* mirror the CU-CP UE ID for CU-UP */ uint32_t cu_up_ue_id = req->gNB_cu_cp_ue_id; f1_ue_data_t ued = {.secondary_ue = req->gNB_cu_cp_ue_id}; - if (need_ue_id_mgmt) { + if (need_ue_id_mgmt && !cu_exists_f1_ue_data(cu_up_ue_id)) { bool success = cu_add_f1_ue_data(cu_up_ue_id, &ued); DevAssert(success); LOG_I(E1AP, "adding UE with CU-CP UE ID %d and CU-UP UE ID %d\n", req->gNB_cu_cp_ue_id, cu_up_ue_id);