<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24664">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty: reassign: add missing check for valid target lchan<br><br>Make sure that the target lchan has been initialized before attempting<br>to reassign.<br><br>I ran into this in the VAMOS tests, forgetting to set the BTS_FEAT_VAMOS<br>in osmo-bts-omldummy: the vty command from ttcn attempts to reassign to<br>a non-initialized lchan, and aborts osmo-bsc.<br><br>Change-Id: Ia77a3312dde0e4b8df9ad2f33339266bae06439d<br>---<br>M src/osmo-bsc/bsc_vty.c<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/64/24664/1</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 430863b..880bd94 100644</span><br><span>--- a/src/osmo-bsc/bsc_vty.c</span><br><span>+++ b/src/osmo-bsc/bsc_vty.c</span><br><span>@@ -6657,6 +6657,10 @@</span><br><span>           vty_out(vty, "cannot re-assign, source lchan is not in ESTABLISHED state%s", VTY_NEWLINE);</span><br><span>                 return CMD_WARNING;</span><br><span>  }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (!to_lchan->fi) {</span><br><span style="color: hsl(120, 100%, 40%);">+               vty_out(vty, "cannot re-assign, target lchan is not initialized%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>    if (!lchan_state_is(to_lchan, LCHAN_ST_UNUSED)) {</span><br><span>            vty_out(vty, "cannot re-assign, target lchan is already in use%s", VTY_NEWLINE);</span><br><span>           return CMD_WARNING;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24664">change 24664</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/+/24664"/><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: Ia77a3312dde0e4b8df9ad2f33339266bae06439d </div>
<div style="display:none"> Gerrit-Change-Number: 24664 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>