Change in osmo-bsc[master]: vty: check with is_ipaccess_bts() before using IPACC

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.org
Wed Jul 1 09:29:12 UTC 2020


dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18971 )

Change subject: vty: check with is_ipaccess_bts() before using IPACC
......................................................................

vty: check with is_ipaccess_bts() before using IPACC

The IPACC protocol is an extension to the conventional RSL protocol
to negotiate ip address and port for RTP/VoIP. This protocol is BTS
specific (sysmobts, ip-access nanobts) and not used with E1 BTSs

The bsc VTY is able to trigger certain IPACC functions for debug
purposes. Some of those commands do not check if the BTS is really of
type IP-access before trying to send an IPACC command. Let's add
checks to prevent IPACC messages to be sent to E1 or otherwise
incompatible BTSs models.

Change-Id: I9ee78b6b1d342abaccc09a87dee6af79e76e5468
Related: OS#2547
---
M src/osmo-bsc/bsc_vty.c
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  neels: Looks good to me, but someone else must approve
  fixeria: Looks good to me, but someone else must approve
  dexter: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index f46a84c..36b16a2 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -5045,7 +5045,8 @@
 		}
 		vty_out(vty, "%% activating lchan %s%s", gsm_lchan_name(lchan), VTY_NEWLINE);
 		rsl_tx_chan_activ(lchan, RSL_ACT_TYPE_INITIAL, 0);
-		rsl_tx_ipacc_crcx(lchan);
+		if (is_ipaccess_bts(lchan->ts->trx->bts))
+			rsl_tx_ipacc_crcx(lchan);
 	} else {
 		if (!lchan->fi) {
 			vty_out(vty, "%% Cannot release: Channel not initialized%s", VTY_NEWLINE);
@@ -5124,6 +5125,11 @@
 
 	lchan = &ts->lchan[ss_nr];
 
+	if (!is_ipaccess_bts(lchan->ts->trx->bts)) {
+		vty_out(vty, "%% BTS is not of ip.access type%s", VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+
 	if (ss_nr >= pchan_subslots(ts->pchan_is)) {
 		vty_out(vty, "%% subslot index %d too large for physical channel %s (%u slots)%s",
 			ss_nr, gsm_pchan_name(ts->pchan_is), pchan_subslots(ts->pchan_is),

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18971
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9ee78b6b1d342abaccc09a87dee6af79e76e5468
Gerrit-Change-Number: 18971
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200701/65db68fc/attachment.htm>


More information about the gerrit-log mailing list