fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34454?usp=email )
Change subject: oml: ipacc: add missing is_ipa_abisip_bts() checks ......................................................................
oml: ipacc: add missing is_ipa_abisip_bts() checks
These functions are called from a signal handler (SS_NM), and the signal itself is sent from the generic OML logic whenever the Software Activated Report is received from some BTS, which is not necessarily a nanoBTS or osmo-bts.
It would be nice if we could check the BTS type once in the signal handler, but the signal data is not always the same and depends on the signal type, so unfortunately it's not possible.
Change-Id: I088ff75f2048e54e4bfd926a79c1dcf27b4fb3a4 --- M src/osmo-bsc/bts_ipaccess_nanobts.c 1 file changed, 42 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c index 24966a7..d99489b 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts.c @@ -235,6 +235,9 @@ struct gsm_bts *bts = sign_link->trx->bts; struct gsm_abis_mo *mo;
+ if (!is_ipa_abisip_bts(bts)) + return; + mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); if (mo == NULL) LOGPFOH(DNM, LOGL_ERROR, foh, "Rx OPSTART ACK for non-existent MO\n"); @@ -249,6 +252,9 @@ struct gsm_bts *bts = sign_link->trx->bts; struct gsm_abis_mo *mo;
+ if (!is_ipa_abisip_bts(bts)) + return; + mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); if (mo == NULL) LOGPFOH(DNM, LOGL_ERROR, foh, "Rx OPSTART NACK for non-existent MO\n"); @@ -263,6 +269,9 @@ struct gsm_bts *bts = sign_link->trx->bts; struct gsm_abis_mo *mo;
+ if (!is_ipa_abisip_bts(bts)) + return; + mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); if (mo == NULL) LOGPFOH(DNM, LOGL_ERROR, foh, "Rx Get Attribute Report for non-existent MO\n"); @@ -276,6 +285,9 @@ struct e1inp_sign_link *sign_link = oml_msg->dst; struct gsm_bts *bts = sign_link->trx->bts;
+ if (!is_ipa_abisip_bts(bts)) + return; + if (foh->obj_class != NM_OC_BTS) { LOG_BTS(bts, DNM, LOGL_ERROR, "Set BTS Attr Ack received on non BTS object!\n"); return; @@ -289,8 +301,12 @@ struct abis_om_fom_hdr *foh = msgb_l3(oml_msg); struct e1inp_sign_link *sign_link = oml_msg->dst; struct gsm_bts *bts = sign_link->trx->bts; - struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + struct gsm_bts_trx *trx;
+ if (!is_ipa_abisip_bts(bts)) + return; + + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); if (!trx || foh->obj_class != NM_OC_RADIO_CARRIER) { LOGPFOH(DNM, LOGL_ERROR, foh, "Set Radio Carrier Attr Ack received on non Radio Carrier object!\n"); return; @@ -301,8 +317,14 @@ static void nm_rx_set_chan_attr_ack(struct msgb *oml_msg) { struct abis_om_fom_hdr *foh = msgb_l3(oml_msg); - struct gsm_bts_trx_ts *ts = abis_nm_get_ts(oml_msg); + struct e1inp_sign_link *sign_link = oml_msg->dst; + struct gsm_bts *bts = sign_link->trx->bts; + struct gsm_bts_trx_ts *ts;
+ if (!is_ipa_abisip_bts(bts)) + return; + + ts = abis_nm_get_ts(oml_msg); if (!ts || foh->obj_class != NM_OC_CHANNEL) { LOGPFOH(DNM, LOGL_ERROR, foh, "Set Channel Attr Ack received on non Radio Channel object!\n"); return;