From b5e35077649f80bc828a55263d26ad77b8629d2e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 22 Oct 2024 13:43:19 +0200 Subject: [PATCH] Fix: store CellGroupConfig from initial UL RRC message This F1 message sends us the CellGroupConfig of the UE. Store it in case we need it. For instance, at least in OAI, it is possible to make a handover without a DRB (this might or might not be standard compliant). However, in this case, we did never receive a UE context setup request, which stores the CellGroupConfig. Hence, store the first CellGroupConfig we receive, to be able to do e.g., handover. --- openair2/RRC/NR/rrc_gNB.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 840844a0ec..7b0333db85 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1029,9 +1029,18 @@ static void rrc_handle_RRCSetupRequest(gNB_RRC_INST *rrc, return; } + NR_CellGroupConfig_t *cellGroupConfig = NULL; + asn_dec_rval_t dec_rval = uper_decode_complete(NULL, + &asn_DEF_NR_CellGroupConfig, + (void **)&cellGroupConfig, + msg->du2cu_rrc_container, + msg->du2cu_rrc_container_length); + AssertFatal(dec_rval.code == RC_OK && dec_rval.consumed > 0, "Cell group config decode error\n"); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; UE = &ue_context_p->ue_context; UE->establishment_cause = rrcSetupRequest->establishmentCause; + UE->masterCellGroup = cellGroupConfig; activate_srb(UE, 1); rrc_gNB_generate_RRCSetup(0, msg->crnti, ue_context_p, msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); }