From c6434c80fd12239866e784f1cfe0a05c3a7e557c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 25 Oct 2024 14:42:56 +0200 Subject: [PATCH] Reestablishment hack: free reconfigurationWithSync After handover, the last CellGroupConfig received is the one for handover, containing a reconfigurationWithSync. Resending this CellGroupConfig to the UE after reestablishment would trigger a handover. Free the reconfigurationWithSync to have the UE complete reestablishment at the current cell. The CU implementation of reestablishment modifies the CellGroupConfig. It should not do this, but does as of now. The specification (38.473 Sec 8.7) foresees an optional F1 UE context modification procedure (which can be used to receive the CellGroupConfig). This should be done instead to retrieve the correct CellGroupConfig. Note that the F1 UE context setup procedure, similar to the UE context modification procedure, would also allow to perform reestablishment on a DU that is not the original one. --- openair2/RRC/NR/rrc_gNB.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index ea962d7461..04e2a3d02f 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -909,6 +909,17 @@ static void rrc_gNB_process_RRCReestablishmentComplete(gNB_RRC_INST *rrc, gNB_RR NR_RLC_BearerConfig__reestablishRLC_true); } + /* TODO: remove a reconfigurationWithSync, we don't need it for + * reestablishment. The whole reason why this might be here is that we store + * the CellGroupConfig (after handover), and simply reuse it for + * reestablishment, instead of re-requesting the CellGroupConfig from the DU. + * Hence, add below hack; the solution would be to request the + * CellGroupConfig from the DU when doing reestablishment. */ + if (cellGroupConfig->spCellConfig->reconfigurationWithSync != NULL) { + ASN_STRUCT_FREE(asn_DEF_NR_ReconfigurationWithSync, cellGroupConfig->spCellConfig->reconfigurationWithSync); + cellGroupConfig->spCellConfig->reconfigurationWithSync = NULL; + } + /* Re-establish SRB2 according to clause 5.3.5.6.3 of 3GPP TS 38.331 * (SRB1 is re-established with RRCReestablishment message) */