diff options
authorPhilipp Maier <pmaier@sysmocom.de>2020-06-23 16:49:08 +0200
committerdexter <pmaier@sysmocom.de>2020-07-01 09:29:12 +0000
commitb7c19ed2b042645ddbf95d023f8255284f6a369f (patch)
parenta702b61b7da4795e0b3c2a88dd15190b3bcc7a37 (diff)
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
1 files changed, 7 insertions, 1 deletions
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index f46a84ca5..36b16a21e 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -5045,7 +5045,8 @@ DEFUN(lchan_act, lchan_act_cmd,
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 @@ DEFUN(lchan_mdcx, lchan_mdcx_cmd,
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),