aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-08-04 03:23:11 +0700
committerlaforge <laforge@osmocom.org>2020-08-04 14:28:56 +0000
commit48ff5313cddb2624a9311718946ab3acf739d249 (patch)
treea442e79816aedb731ecd3da554a88aae3234d3df
parent10e64630ce24b6ab9b7546374a2a149fd2235ccc (diff)
oml: fix ARFCN range check in oml_rx_set_radio_attr()
-rw-r--r--src/common/oml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 39304f1f..34d1a5c9 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -775,7 +775,7 @@ static int oml_rx_set_radio_attr(struct gsm_bts_trx *trx, struct msgb *msg)
memcpy(&_value, value, 2);
arfcn = ntohs(_value);
value += 2;
- if (arfcn > 1024) {
+ if (arfcn >= 1024) { /* 0 .. 1023 (1024 channels total) */
oml_tx_failure_event_rep(&trx->bts->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN,
"Given ARFCN %u is unsupported", arfcn);
LOGPFOH(DOML, LOGL_NOTICE, foh, "Given ARFCN %u is unsupported.\n", arfcn);