<p>Sean Bright <strong>uploaded patch set #6</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/9984">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip: Correct various misuses of pjsip_rx_data.pkt_info.src_name<br><br>An assumption is being made about the contents of<br>pjsip_rx_data.pkt_info.src_name when IPv6 is in use. PJSIP's internal<br>transports set this field to the raw IP address of the sender of the<br>packet, which in the case of IPv6 does not contain the delimiting<br>[brackets].<br><br>There are several places where we attempt to use ast_sockaddr_parse()<br>to parse the src_name, which will fail silently (because we aren't<br>checking the return value of ast_sockaddr_parse() in many places) for<br>IPv6 adddresses.<br><br>res_pjsip_transport_websocket is incorrectly setting this field to<br>include the brackets, causing some outgoing header values to be non-<br>compliant with RFC 3261.<br><br>When src_name is populated by the built-in PJSIP transports, the code<br>uses pj_sockaddr_print() with 'flags' set to 0, meaning that the<br>brackets are not rendered around IPv6 addresses.<br><br>This may be related to ASTERISK~27101.<br><br>See also: https://github.com/onsip/SIP.js/pull/594<br><br>ASTERISK-28020 #close<br><br>Change-Id: I8ea9d289901b837512bee2ca2535e3dc14f04d77<br>---<br>M include/asterisk/netsock2.h<br>M main/netsock2.c<br>M res/res_pjsip.c<br>M res/res_pjsip/pjsip_distributor.c<br>M res/res_pjsip/security_events.c<br>M res/res_pjsip_acl.c<br>M res/res_pjsip_endpoint_identifier_ip.c<br>M res/res_pjsip_logger.c<br>M res/res_pjsip_session.c<br>M res/res_pjsip_transport_websocket.c<br>10 files changed, 69 insertions(+), 12 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/84/9984/6</pre><p>To view, visit <a href="https://gerrit.asterisk.org/9984">change 9984</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/9984"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I8ea9d289901b837512bee2ca2535e3dc14f04d77 </div>
<div style="display:none"> Gerrit-Change-Number: 9984 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>