mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
bugfix: fix A3 event configuration
Fix for issue 1080 on gitlab (https://gitlab.eurecom.fr/oai/openairinterface5g/-/work_items/1080) The issue is: When a UE attaches to a gNB with multiple neighbour cells configured and default A3 event configuration is used, the generated RRCReconfiguration contains a MeasIdToAddMod whose reportConfigId is 0. UPER encoding then fails because the ASN.1 schema constrains the field. The root cause is that there are 'continue' paths that skip the index increment in the producer/consumer pair that maps neighbour cells to A3 reportConfigIds. Let's remove all the bad 'continue'. Signed-off-by: Cedric Roux <cedric.roux@eurecom.fr>
This commit is contained in:
@@ -1262,11 +1262,11 @@ NR_MeasConfig_t *get_MeasConfig(const NR_MeasTiming_t *mt,
|
||||
FOR_EACH_SEQ_ARR(nr_neighbour_cell_t *, neigh_cell, neigh_seq) {
|
||||
NR_ReportConfigId_t reportConfigId = neigh_a3_id[i];
|
||||
/* check that there is a A3 configured for this neighbour */
|
||||
if (reportConfigId == -1)
|
||||
continue;
|
||||
NR_MeasIdToAddMod_t *measid_A3 = get_MeasId(meas_idx + 1, reportConfigId, i + 2);
|
||||
meas_idx++;
|
||||
asn1cSeqAdd(&mc->measIdToAddModList->list, measid_A3);
|
||||
if (reportConfigId != -1) {
|
||||
NR_MeasIdToAddMod_t *measid_A3 = get_MeasId(meas_idx + 1, reportConfigId, i + 2);
|
||||
meas_idx++;
|
||||
asn1cSeqAdd(&mc->measIdToAddModList->list, measid_A3);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -790,22 +790,17 @@ NR_MeasConfig_t *nr_rrc_get_measconfig(const gNB_RRC_INST *rrc, uint64_t nr_cell
|
||||
seq_arr_push_back(&neigh_seq, neighbourCell, sizeof(nr_neighbour_cell_t));
|
||||
const nr_a3_event_t *a3Event = get_a3_configuration((gNB_RRC_INST *)rrc, neighbourCell->physicalCellId);
|
||||
if (!a3Event) {
|
||||
/* no A3 event configured for this neighbour, let's try the default one, if it exists */
|
||||
if (default_a3_added) {
|
||||
/* default A3 exists and is already added, use it for this neighbour */
|
||||
neigh_a3_id[i] = 3;
|
||||
continue;
|
||||
/* no A3 event configured for this neighbour, use the default one, if it exists and not already configured */
|
||||
neigh_a3_id[i] = -1;
|
||||
if (!default_a3_added) {
|
||||
/* try to get the default A3 config */
|
||||
a3Event = get_a3_configuration((gNB_RRC_INST *)rrc, -1);
|
||||
if (a3Event) {
|
||||
default_a3_added = true;
|
||||
/* default A3 report config ID is 3 */
|
||||
neigh_a3_id[i] = 3;
|
||||
}
|
||||
}
|
||||
/* try to get the default A3 config */
|
||||
a3Event = get_a3_configuration((gNB_RRC_INST *)rrc, -1);
|
||||
if (!a3Event) {
|
||||
/* no default A3 config found, so no A3 config for this neighbour */
|
||||
neigh_a3_id[i] = -1;
|
||||
continue;
|
||||
}
|
||||
default_a3_added = true;
|
||||
/* default A3 report config ID is 3 */
|
||||
neigh_a3_id[i] = 3;
|
||||
} else {
|
||||
/* specific A3 report config ID are 4, 5, ... */
|
||||
neigh_a3_id[i] = i + 4;
|
||||
|
||||
Reference in New Issue
Block a user