<p>dexter <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18971">View Change</a></p><div style="white-space:pre-wrap">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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty: check with is_ipaccess_bts() before using IPACC<br><br>The IPACC protocol is an extension to the conventional RSL protocol<br>to negotiate ip address and port for RTP/VoIP. This protocol is BTS<br>specific (sysmobts, ip-access nanobts) and not used with E1 BTSs<br><br>The bsc VTY is able to trigger certain IPACC functions for debug<br>purposes. Some of those commands do not check if the BTS is really of<br>type IP-access before trying to send an IPACC command. Let's add<br>checks to prevent IPACC messages to be sent to E1 or otherwise<br>incompatible BTSs models.<br><br>Change-Id: I9ee78b6b1d342abaccc09a87dee6af79e76e5468<br>Related: OS#2547<br>---<br>M src/osmo-bsc/bsc_vty.c<br>1 file changed, 7 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c</span><br><span>index f46a84c..36b16a2 100644</span><br><span>--- a/src/osmo-bsc/bsc_vty.c</span><br><span>+++ b/src/osmo-bsc/bsc_vty.c</span><br><span>@@ -5045,7 +5045,8 @@</span><br><span>                }</span><br><span>            vty_out(vty, "%% activating lchan %s%s", gsm_lchan_name(lchan), VTY_NEWLINE);</span><br><span>              rsl_tx_chan_activ(lchan, RSL_ACT_TYPE_INITIAL, 0);</span><br><span style="color: hsl(0, 100%, 40%);">-              rsl_tx_ipacc_crcx(lchan);</span><br><span style="color: hsl(120, 100%, 40%);">+             if (is_ipaccess_bts(lchan->ts->trx->bts))</span><br><span style="color: hsl(120, 100%, 40%);">+                    rsl_tx_ipacc_crcx(lchan);</span><br><span>    } else {</span><br><span>             if (!lchan->fi) {</span><br><span>                         vty_out(vty, "%% Cannot release: Channel not initialized%s", VTY_NEWLINE);</span><br><span>@@ -5124,6 +5125,11 @@</span><br><span> </span><br><span>    lchan = &ts->lchan[ss_nr];</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!is_ipaccess_bts(lchan->ts->trx->bts)) {</span><br><span style="color: hsl(120, 100%, 40%);">+         vty_out(vty, "%% BTS is not of ip.access type%s", VTY_NEWLINE);</span><br><span style="color: hsl(120, 100%, 40%);">+             return CMD_WARNING;</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  if (ss_nr >= pchan_subslots(ts->pchan_is)) {</span><br><span>           vty_out(vty, "%% subslot index %d too large for physical channel %s (%u slots)%s",</span><br><span>                         ss_nr, gsm_pchan_name(ts->pchan_is), pchan_subslots(ts->pchan_is),</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18971">change 18971</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/18971"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I9ee78b6b1d342abaccc09a87dee6af79e76e5468 </div>
<div style="display:none"> Gerrit-Change-Number: 18971 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>