<p>Patch set 4:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/9984">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/9984/4/res/res_pjsip_transport_websocket.c">File res/res_pjsip_transport_websocket.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9984/4/res/res_pjsip_transport_websocket.c@296">Patch Set #4, Line 296:</a> <code style="font-family:monospace,monospace"> pj_ansi_strcpy(rdata->pkt_info.src_name, ast_sockaddr_stringify_addr(ast_websocket_remote_address(session)));</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This is opening up a can of worms as this string is used throughout PJPROJECT and Asterisk. Just about everywhere in the projects use the string in such a way that the []'s need to be there. People are so used to working with IPv4 addresses that when the IPv6 address comes around it is used incorrectly unless there are []'s present.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Examples:<br>Log messages Log("%s:%d", rdata->pkt_info.src_name, port)</p><p style="white-space: pre-wrap; word-wrap: break-word;">More severely:<br>ast_sockaddr_parse() in Asterisk needs the []'s to know where the port is in the string for IPv6 addresses since the port is appended to the address with a ':' delimiter which unfortunately is used in IPv6 addresses.</p><p style="white-space: pre-wrap; word-wrap: break-word;">PJPROJECT might also have a problem converting the IPv6 address to a sockaddr unless there are []'s too. Though that code is confusing enough to defy quick analysis.</p></li></ul></li></ul><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: comment </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: 4 </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>
<div style="display:none"> Gerrit-Comment-Date: Wed, 22 Aug 2018 16:53:14 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>