[PATCH] osmo-bts[master]: Remove incorrect BTS number check

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Tue Jun 6 15:27:32 UTC 2017


Review at  https://gerrit.osmocom.org/2846

Remove incorrect BTS number check

According to log messages this is a range check but only lowest and
highest values are checked so the error will be triggered for any BTS
other than 0 configured in OpenBSC. Moreover, even if implemented as
actual range check it will not make sense with the given range values
because it's enforced by bts_nr type which is uint8_t. Hence, removing
it altogether.

Fixes: OS#2317
Change-Id: Ia3d5078ed1239d553c7200ceb5b08b638df33a15
---
M src/common/oml.c
1 file changed, 0 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/2846/1

diff --git a/src/common/oml.c b/src/common/oml.c
index 9dddf57..61eb659 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -999,21 +999,6 @@
 		return -EIO;
 	}
 
-	if (foh->obj_inst.bts_nr != 0 && foh->obj_inst.bts_nr != 0xff) {
-		LOGP(DOML, LOGL_INFO, "Formatted O&M with BTS %d out of range.\n", foh->obj_inst.bts_nr);
-		trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr);
-		if (trx) {
-			trx->mo.obj_inst.bts_nr = 0;
-			trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr;
-			trx->mo.obj_inst.ts_nr = 0xff;
-			oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG,
-						 "Formatted O&M with BTS %d out"
-						 " of range (0:0xFF)",
-						 foh->obj_inst.bts_nr);
-		}
-		return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN);
-	}
-
 	switch (foh->msg_type) {
 	case NM_MT_SET_BTS_ATTR:
 		ret = oml_rx_set_bts_attr(bts, msg);
@@ -1301,11 +1286,6 @@
 
 	msg->l3h = oh->data + 1 + idstrlen;
 	foh = (struct abis_om_fom_hdr *) msg->l3h;
-
-	if (foh->obj_inst.bts_nr != 0 && foh->obj_inst.bts_nr != 0xff) {
-		LOGP(DOML, LOGL_INFO, "Manufacturer O&M with BTS %d out of range.\n", foh->obj_inst.bts_nr);
-		return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN);
-	}
 
 	ret = oml_tlv_parse(&tp, foh->data, oh->length - sizeof(*foh));
 	if (ret < 0) {

-- 
To view, visit https://gerrit.osmocom.org/2846
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3d5078ed1239d553c7200ceb5b08b638df33a15
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list