diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2020-06-23 16:49:08 +0200 |
---|---|---|
committer | dexter <pmaier@sysmocom.de> | 2020-07-01 09:29:12 +0000 |
commit | b7c19ed2b042645ddbf95d023f8255284f6a369f (patch) | |
tree | a821d43dc9b631025f596e951f91e029a9a23464 /src | |
parent | a702b61b7da4795e0b3c2a88dd15190b3bcc7a37 (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
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/bsc_vty.c | 8 |
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), |