From 825cbcdb47e61b58f8cc76e9c7ee45fafa0a9bc2 Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Wed, 7 Jan 2026 19:51:36 +0100 Subject: [PATCH] RRC: Allow re-establishment on different DU when physCellId differs When a UE re-establishes on a different DU, the physCellId in the re-establishment request (from the old cell) will differ from the new DU's physCellId. The previous check incorrectly treated this as a "too fast movement" scenario and triggered fallback to RRC setup. This fix distinguishes between two scenarios: 1. Different DU scenario: physCellId differs because UE is on a different DU - this is legitimate and should be allowed. UE Context Setup will be triggered at RRCReestablishmentComplete. 2. Same DU but different physCellId: "too fast movement" scenario - fallback to RRC setup as before. The fix checks if assoc_id != ue_data.du_assoc_id to detect a different DU scenario and allows re-establishment in that case. This addresses the issue where re-establishment on a different DU was incorrectly rejected, preventing proper UE Context Setup per TS 38.401 Section 8.7. --- openair2/RRC/NR/rrc_gNB.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index b0b9a64e7d..20b25fe494 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1558,17 +1558,25 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc, DevAssert(success); nr_rrc_finalize_ho(UE); } else if (physCellId != cell_info->nr_pci) { - /* UE was moving from previous cell so quickly that RRCReestablishment for previous cell was received in this cell */ - LOG_I(NR_RRC, - "RRC Reestablishment Request from different physCellId (%ld) than current physCellId (%d), fallback to RRC setup\n", - physCellId, - cell_info->nr_pci); - ngap_cause = NGAP_CAUSE_RADIO_NETWORK_RELEASE_DUE_TO_NGRAN_GENERATED_REASON; - /* 38.401 8.7: "If the UE accessed from a gNB-DU other than the original - * one, the gNB-CU should trigger the UE Context Setup procedure". Let's - * assume that the old DU will trigger a release request, also freeing the - * ongoing context at the CU. Hence, create new below */ - goto fallback_rrc_setup; + /* Check if this is a different DU scenario or "too fast movement" scenario */ + if (assoc_id != ue_data.du_assoc_id) { + /* Different DU scenario - physCellId differs because UE is re-establishing on a different DU. + * Re-establishment is allowed, UE Context Setup will be triggered at RRCReestablishmentComplete. */ + LOG_I(NR_RRC, + "UE %d: Re-establishment on different DU (physCellId %ld from old cell != %d from new DU)\n", + UE->rrc_ue_id, + physCellId, + cell_info->nr_pci); + } else { + /* Same DU but different physCellId - "too fast movement" scenario: + * UE was moving from previous cell so quickly that RRCReestablishment for previous cell was received in this cell */ + LOG_I(NR_RRC, + "RRC Reestablishment Request from different physCellId (%ld) than current physCellId (%d), fallback to RRC setup\n", + physCellId, + cell_info->nr_pci); + ngap_cause = NGAP_CAUSE_RADIO_NETWORK_RELEASE_DUE_TO_NGRAN_GENERATED_REASON; + goto fallback_rrc_setup; + } } /* TODO: start timer in ITTI and drop UE if it does not come back */