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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26197 ) Change subject: abis_nm: actively block BTSs with invalid configuration ...................................................................... abis_nm: actively block BTSs with invalid configuration At the moment the BTS configuration is checked, but the check does not have much consequence other than that some initialization that is not executed. The BTS will go into the OML bootstrap phase anyway and most likely fail at some later point due to the invalid configuration. To reduce noise and unexpected behaviour of the BTS lets make sure that the OML boostrap phase can only proceed when the BSC conciders the configuration as valid. Change-Id: I42c1c26a9b800600787b1266a871f95f2114c26e Related: OS#5369 --- M include/osmocom/bsc/bts.h M src/osmo-bsc/abis_nm.c M src/osmo-bsc/osmo_bsc_main.c 3 files changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/97/26197/1 diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 7e73acd..2150060 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -284,6 +284,10 @@ /* Geographical location of the BTS */ struct llist_head loc_list; + /* Flag to indicate that this BTS has a valid configuration set. + * This flag is set by check_bts() in osmo_bsc_main.c. */ + bool valid_config; + /* number of this BTS in network */ uint8_t nr; /* human readable name / description */ diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 7c04394..cdab587 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -931,6 +931,21 @@ struct gsm_bts *bts = sign_link->trx->bts; int ret = 0; + /* Check if this BTS has a valid configuration. If not we will inhibit the BTS + * from booting with invalid configuration values by rejecting any OML messages + * comming from the BTS. */ + if (!bts->valid_config) { + struct nm_nack_signal_data nack_data; + LOGPFOH(DNM, LOGL_NOTICE, foh, "(bts=%u) BTS configuration inavlid, rejecting OML NM Message from BTS -- check and correct configuratin!\n", + bts->nr); + nack_data.msg = mb; + nack_data.mt = mt; + nack_data.bts = bts; + osmo_signal_dispatch(SS_NM, S_NM_NACK, &nack_data); + abis_nm_queue_send_next(bts); + return 0; + } + /* check for unsolicited message */ if (is_report(mt)) return abis_nm_rcvmsg_report(mb, bts); diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index a2d367b..573376a 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -396,6 +396,8 @@ if (!bts->model) return -EFAULT; + bts->valid_config = false; + switch (bts->band) { case GSM_BAND_1800: if (bts->c0->arfcn < 512 || bts->c0->arfcn > 885) { @@ -436,6 +438,7 @@ } } + bts->valid_config = true; return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I42c1c26a9b800600787b1266a871f95f2114c26e Gerrit-Change-Number: 26197 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211110/f08602c5/attachment.htm>