From f021b8b5be6b4db7ffb121eff87d1392bd1eede0 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 3 Jan 2024 17:34:07 +0100 Subject: [PATCH] Bugfix: only fill DU system information if SA In NSA, we don't have SIB1. However, the DU system information requires both MIB and SIB1, but is itself optional. So, in NSA, don't fill the DU system information. --- openair2/GNB_APP/gnb_config.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index bc12793140..7e102e2a5e 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1153,18 +1153,20 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id, req->cell[0].info.measurement_timing_information = "0"; - int buf_len = 3; // this is what we assume in monolithic - req->cell[0].sys_info = calloc(1, sizeof(*req->cell[0].sys_info)); - AssertFatal(req->cell[0].sys_info != NULL, "out of memory\n"); - f1ap_gnb_du_system_info_t *sys_info = req->cell[0].sys_info; - sys_info->mib = calloc(buf_len, sizeof(*sys_info->mib)); - DevAssert(sys_info->mib != NULL); - DevAssert(mib != NULL); - sys_info->mib_length = encode_MIB_NR(mib, 0, sys_info->mib, buf_len); - DevAssert(sys_info->mib_length == buf_len); - if (get_softmodem_params()->sa) { - // in NSA we don't transmit SIB1 + // in NSA we don't transmit SIB1, so cannot fill DU system information + // so cannot send MIB either + + int buf_len = 3; // this is what we assume in monolithic + req->cell[0].sys_info = calloc(1, sizeof(*req->cell[0].sys_info)); + AssertFatal(req->cell[0].sys_info != NULL, "out of memory\n"); + f1ap_gnb_du_system_info_t *sys_info = req->cell[0].sys_info; + sys_info->mib = calloc(buf_len, sizeof(*sys_info->mib)); + DevAssert(sys_info->mib != NULL); + DevAssert(mib != NULL); + sys_info->mib_length = encode_MIB_NR(mib, 0, sys_info->mib, buf_len); + DevAssert(sys_info->mib_length == buf_len); + DevAssert(sib1 != NULL); NR_SIB1_t *bcch_SIB1 = sib1->message.choice.c1->choice.systemInformationBlockType1; sys_info->sib1 = calloc(NR_MAX_SIB_LENGTH / 8, sizeof(*sys_info->sib1));