aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/system_information.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-11-16 13:50:53 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-11-20 18:14:43 +0000
commit89f3a3347f29997c384c9387f71b3d27a4a32f47 (patch)
tree78dacd8589d7556bb698b6eae69a5cc3fa8d3374 /src/osmo-bsc/system_information.c
parent167cb828665b91ed7d28007abd4a1862ebbb78c9 (diff)
bsc: band_compatible: Return band non-compatible for invalid arfcn
Before libosmocore Change-Id I780d452dcebce385469e32ef2fd844df6033393a, it avoids stating arfcn 886-954 are compatible when operating under DC1800. After that Change-Id, avoids aborting the program due to unexpected behaviour. Related: OS#3063 Depends: libosmocore Change-Id I780d452dcebce385469e32ef2fd844df6033393a Change-Id: Ibf5d5ab50b6fc6597244eeedcd27d2ce245278a3
Diffstat (limited to 'src/osmo-bsc/system_information.c')
-rw-r--r--src/osmo-bsc/system_information.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c
index 0a441dc46..4709f7fc0 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -53,7 +53,12 @@ struct gsm0808_cell_id_list2;
*/
static int band_compatible(const struct gsm_bts *bts, int arfcn)
{
- enum gsm_band band = gsm_arfcn2band(arfcn);
+ enum gsm_band band;
+
+ if (gsm_arfcn2band_rc(arfcn, &band) < 0) {
+ LOGP(DRR, LOGL_ERROR, "Invalid arfcn %d detected!\n", arfcn);
+ return 0;
+ }
/* normal case */
if (band == bts->band)