<p>laforge <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19001">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Fix race during fast re-establishment of inbound M3UA connections<br><br>When a client closes and instantaneously re-opens a SCTP socket for an<br>M3UA connection, there is a chance that both the "shutdwon event" (old<br>connection socket becomes readable for sctp event) and the "init event"<br>(listen-fd becomes readable) happen during the same scheduler interval /<br>select() cycle.  As there is no guaranteed order by which we call our<br>file descriptor callbacks, it means that we may end up processing<br>then new connection (accept) before we get the notification that the<br>old one is dead.<br><br>The fact that the fd number of the accept-fd is mostly lower than the fd<br>number of the individual per-client connection actually makes it likely<br>that the order is exactly the opposite of what would feel "logical".<br><br>As the ASP is identified by the tuple of (src-port, src-ip, dst-port, dst-ip),<br>both the old connection and the new connection map to the same ASP<br>object.  So we need to handle this situation gracefully:  If we get a<br>new connection for a tuple that we already [think we still] have one,<br>close the old one and use the new.<br><br>Change-Id: I9b3ae6dfcf6efeabb7fb6c33503d1d7924fec2fa<br>Closes: OS#4625<br>---<br>M src/osmo_ss7.c<br>1 file changed, 12 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/01/19001/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19001">change 19001</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/libosmo-sccp/+/19001"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-sccp </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I9b3ae6dfcf6efeabb7fb6c33503d1d7924fec2fa </div>
<div style="display:none"> Gerrit-Change-Number: 19001 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>