<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10329">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">network: do not patch PT of RTCP packets<br><br>At the moment all packets that are sent with mgcp_send are fed into<br>mgcp_patch_pt(). This functions corrects the payload type so that it<br>matches the codec configuration on the egress side. However, this<br>functions is only to be used with RTP packets and must not be used on<br>RTCP packets, which we currently do because we do not check if the<br>packet is RTCP or RTP.<br><br>- Check if the packet is RTP before running mgcp_patch_pt()<br><br>Change-Id: I55b8aa830e4e23f991373470bd04d4db12241c56<br>Related: OS#3444<br>---<br>M src/libosmo-mgcp/mgcp_network.c<br>1 file changed, 7 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/29/10329/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c</span><br><span>index 1b1867a..6dfc5a5 100644</span><br><span>--- a/src/libosmo-mgcp/mgcp_network.c</span><br><span>+++ b/src/libosmo-mgcp/mgcp_network.c</span><br><span>@@ -717,11 +717,13 @@</span><br><span>   * course unable to patch the payload type. A situation like this</span><br><span>     * should not occur if transcoding is consequently avoided. Until</span><br><span>     * we have transcoding support in osmo-mgw we can not resolve this. */</span><br><span style="color: hsl(0, 100%, 40%);">-  rc = mgcp_patch_pt(conn_src, conn_dst, buf, len);</span><br><span style="color: hsl(0, 100%, 40%);">-       if (rc < 0) {</span><br><span style="color: hsl(0, 100%, 40%);">-                LOGP(DRTP, LOGL_ERROR,</span><br><span style="color: hsl(0, 100%, 40%);">-               "endpoint:0x%x can not patch PT because no suitable egress codec was found.\n",</span><br><span style="color: hsl(0, 100%, 40%);">-               ENDPOINT_NUMBER(endp));</span><br><span style="color: hsl(120, 100%, 40%);">+  if (is_rtp) {</span><br><span style="color: hsl(120, 100%, 40%);">+         rc = mgcp_patch_pt(conn_src, conn_dst, buf, len);</span><br><span style="color: hsl(120, 100%, 40%);">+             if (rc < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+                      LOGP(DRTP, LOGL_ERROR,</span><br><span style="color: hsl(120, 100%, 40%);">+                             "endpoint:0x%x can not patch PT because no suitable egress codec was found.\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                             ENDPOINT_NUMBER(endp));</span><br><span style="color: hsl(120, 100%, 40%);">+          }</span><br><span>    }</span><br><span> </span><br><span>        /* Note: In case of loopback configuration, both, the source and the</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10329">change 10329</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/10329"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I55b8aa830e4e23f991373470bd04d4db12241c56 </div>
<div style="display:none"> Gerrit-Change-Number: 10329 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>