From 693dfb9374e591a1dfff6f13351f42e2ee5ac803 Mon Sep 17 00:00:00 2001 From: Marius Tillner Date: Tue, 22 Jul 2025 15:51:01 +0200 Subject: [PATCH] bugfix: avoid segmentation fault when Redcap tries to connect to gNB as NR_ServingCellConfig_t scd is NULL when Redcap does RA --- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index ad22b9dd63..c7fc724747 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -3503,7 +3503,8 @@ static bool verify_radio_configuration(int uid, const NR_ServingCellConfigCommon return false; } - int n_dl_bwp = scd->downlinkBWP_ToAddModList ? scd->downlinkBWP_ToAddModList->list.count : 1; + /* for RedCap, scd is NULL */ + int n_dl_bwp = scd && scd->downlinkBWP_ToAddModList ? scd->downlinkBWP_ToAddModList->list.count : 1; int csi_offset = fs->numb_slots_period * n_dl_bwp; // see set_csirs_periodicity if (csi_offset / 320 >= get_full_dl_slots_per_period(fs)) {