From 6be9e42a1d56d0c00c6e85920005f26dab3c6daf Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sun, 18 Apr 2021 15:56:13 +0200 Subject: fix wrong ARFCNs in local-cell neighbor config For neighbors configured without explicit ARFCN+BSIC ('neighbor bts N', 'neighbor lac-ci N M', ...), actually use the local neighbor cell's ARFCN. So far the code looked correct on first sight, but passed an unused part of the struct neighbor union, always resulting in ARFCN 0. Related: SYS#5367 Change-Id: Ifb54d9a91e9bca032c721f12c873c6216733e7b1 --- src/osmo-bsc/system_information.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 0dbf53c19..7ec613c41 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -673,12 +673,14 @@ static int generate_bcch_chan_list(uint8_t *chan_list, struct gsm_bts *bts, bitvec_set_bit_pos(bv, n->cell_id.ab.arfcn, 1); } else { struct gsm_bts *neigh_bts; - if (resolve_local_neighbor(&neigh_bts, bts, n) == 0) - bitvec_set_bit_pos(bv, n->cell_id.ab.arfcn, 1); - else + if (resolve_local_neighbor(&neigh_bts, bts, n)) { LOGP(DHO, LOGL_ERROR, "Neither local nor remote neighbor: BTS %u -> %s\n", bts->nr, neighbor_to_str_c(OTC_SELECT, n)); + continue; + } + if (neigh_bts->c0) + bitvec_set_bit_pos(bv, neigh_bts->c0->arfcn, 1); } } } -- cgit v1.2.3