From 3d2bf72efa3820eb6070f769939102d07bdc125b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 11 Jul 2024 07:41:45 +0200 Subject: [PATCH] Use correct RRC UE ID for NSA UEs The RRC UE context has the RRC UE ID. Use that instead of hardcoding something that might be wrong (because the RRC UE ID can be reused, whereas the counter just blindly increases). The next commit will use that RRC UE ID to free the PDCP context for the UE. It might be wrong on reattach otherwise, because the RRC UE ID could again be 1. --- openair2/RRC/NR/rrc_gNB_nsa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index c1a43a9c97..a8bc072609 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -344,8 +344,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a // layers use different IDs (MAC/RLC use RNTI as DU UE ID, above use NGAP ID // as CU UE ID. uint32_t du_ue_id = ue_context_p->ue_context.rnti; - static uint32_t rrc_ue_id = 0; - rrc_ue_id++; + uint32_t rrc_ue_id = ue_context_p->ue_context.rrc_ue_id; f1_ue_data_t du_ue_data = {.secondary_ue = rrc_ue_id}; du_add_f1_ue_data(du_ue_id, &du_ue_data); f1_ue_data_t cu_ue_data = {.secondary_ue = du_ue_id};