<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/10333">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">GSCON: avoid sending connection oriented data when not connected<br><br>When no connection is present and had never existed, then<br>conn->sccp.msc is unpopulated. However, there may be situations where<br>osmo_bsc_sigtran_send() is executed while no connection is present.<br><br>At the moment we assert on conn->sccp.msc, which would cause osmo-bsc<br>to exit. In order to avoid this, better check conn->sccp.msc and drop<br>the sccp message when the check is negative.<br><br>- Remove assertion, add check.<br><br>Change-Id: I4eaa983702224e5995a388ea9890ee04212eb569<br>Related: OS#3446<br>---<br>M src/osmo-bsc/osmo_bsc_sigtran.c<br>1 file changed, 6 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c</span><br><span>index 19d4817..b97d51b 100644</span><br><span>--- a/src/osmo-bsc/osmo_bsc_sigtran.c</span><br><span>+++ b/src/osmo-bsc/osmo_bsc_sigtran.c</span><br><span>@@ -348,7 +348,12 @@</span><br><span> </span><br><span>    OSMO_ASSERT(conn);</span><br><span>   OSMO_ASSERT(msg);</span><br><span style="color: hsl(0, 100%, 40%);">-       OSMO_ASSERT(conn->sccp.msc);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     if (!conn->sccp.msc) {</span><br><span style="color: hsl(120, 100%, 40%);">+             LOGP(DMSC, LOGL_ERROR, "MSC is not connected. Dropping.\n");</span><br><span style="color: hsl(120, 100%, 40%);">+                msgb_free(msg);</span><br><span style="color: hsl(120, 100%, 40%);">+               return -EINVAL;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span> </span><br><span>        msc = conn->sccp.msc;</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10333">change 10333</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/10333"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I4eaa983702224e5995a388ea9890ee04212eb569 </div>
<div style="display:none"> Gerrit-Change-Number: 10333 </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: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>