<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10999">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgcp_osmux: Use define to calculate rtp_ssrc_winlen<br><br>Since that define is already used to allocate size of osmux_cid_bitmap,<br>let's use it here too instead of hardcoding its value.<br><br>Change-Id: I768ca1b510bf44508ae064dc31620e739260470b<br>---<br>M openbsc/src/libmgcp/mgcp_osmux.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/99/10999/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c</span><br><span>index a4b7e7a..69f1c66 100644</span><br><span>--- a/openbsc/src/libmgcp/mgcp_osmux.c</span><br><span>+++ b/openbsc/src/libmgcp/mgcp_osmux.c</span><br><span>@@ -434,12 +434,12 @@</span><br><span>       * used to reconstruct the RTP flow from osmux. The RTP SSRC is</span><br><span>       * allocated based on the circuit ID (endp->osmux.cid), which is unique</span><br><span>    * in the local scope to the BSC/BSC-NAT. We use it to divide the RTP</span><br><span style="color: hsl(0, 100%, 40%);">-    * SSRC space (2^32) by the 256 possible circuit IDs, then randomly</span><br><span style="color: hsl(120, 100%, 40%);">+    * SSRC space (2^32) by the OSMUX_CID_MAX + 1 possible circuit IDs, then randomly</span><br><span>     * select one value from that window. Thus, we have no chance to have</span><br><span>         * overlapping RTP SSRC traveling to the BTSes behind the BSC,</span><br><span>        * similarly, for flows traveling to the MSC.</span><br><span>         */</span><br><span style="color: hsl(0, 100%, 40%);">-     static const uint32_t rtp_ssrc_winlen = UINT32_MAX / 256;</span><br><span style="color: hsl(120, 100%, 40%);">+     static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1);</span><br><span> </span><br><span>        if (endp->osmux.state == OSMUX_STATE_DISABLED) {</span><br><span>          LOGP(DMGCP, LOGL_ERROR, "Endpoint %u didn't request Osmux\n",</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10999">change 10999</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/10999"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: openbsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I768ca1b510bf44508ae064dc31620e739260470b </div>
<div style="display:none"> Gerrit-Change-Number: 10999 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>