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.
This commit is contained in:
Robert Schmidt
2025-04-02 08:03:03 +02:00
parent fca1971a2d
commit 7e1c3e4213
+1 -1
View File
@@ -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);