<p>George Joseph <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13207">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_rtp_asterisk: Always return provided DTLS packet length.<br><br>OpenSSL can not tolerate if the packet sent out does not<br>match the length that it provided to the sender. This change<br>lies and says that each time the full packet was sent. If<br>a problem does occur then a retransmission will occur as<br>appropriate.<br><br>ASTERISK-28576<br><br>Change-Id: Id42455b15c9dc4eb987c8c023ece6fbf3c22a449<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 8 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c</span><br><span>index 19c7338..bac5734 100644</span><br><span>--- a/res/res_rtp_asterisk.c</span><br><span>+++ b/res/res_rtp_asterisk.c</span><br><span>@@ -660,6 +660,10 @@</span><br><span>     struct ast_sockaddr remote_address = { {0, } };</span><br><span>      int ice;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+  /* OpenSSL can't tolerate a packet not being sent, so we always state that</span><br><span style="color: hsl(120, 100%, 40%);">+         * we sent the packet. If it isn't then retransmission will occur.</span><br><span style="color: hsl(120, 100%, 40%);">+         */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>        if (rtp->rtcp && rtp->rtcp->dtls.write_bio == bio) {</span><br><span>                rtcp = 1;</span><br><span>            ast_sockaddr_copy(&remote_address, &rtp->rtcp->them);</span><br><span>@@ -668,10 +672,12 @@</span><br><span>  }</span><br><span> </span><br><span>        if (ast_sockaddr_isnull(&remote_address)) {</span><br><span style="color: hsl(0, 100%, 40%);">-         return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+             return len;</span><br><span>  }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   return __rtp_sendto(instance, (char *)buf, len, 0, &remote_address, rtcp, &ice, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+   __rtp_sendto(instance, (char *)buf, len, 0, &remote_address, rtcp, &ice, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        return len;</span><br><span> }</span><br><span> </span><br><span> static long dtls_bio_ctrl(BIO *bio, int cmd, long arg1, void *arg2)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13207">change 13207</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.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.asterisk.org/c/asterisk/+/13207"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id42455b15c9dc4eb987c8c023ece6fbf3c22a449 </div>
<div style="display:none"> Gerrit-Change-Number: 13207 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>