<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/2660/">https://reviewboard.asterisk.org/r/2660/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 5th, 2013, 11:37 a.m. EDT, <b>Matt Jordan</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">First, thanks for IPv6-ifying chan_iax2. It's been a long time coming, and I think *every* AstriDevCon we talk about it, try to make it a priority, and it never seems to quite get done. Or even started, really. So - thanks!
Olle mentioned on the asterisk-dev mailing list (http://lists.digium.com/pipermail/asterisk-dev/2013-July/061189.html) that this does suffer from a lack of support for the happy eyeballs RFC - see http://tools.ietf.org/html/rfc6555. I didn't see the branch he was referring to in his branch index (http://svn.asterisk.org/svn/asterisk/team/oej/00INDEX/branch-directory.txt) - but I could be missing it.
So, I'm not sure how much the lack of happy eyeball support impacts this work. I would hope that the management of the dual stack would occur at a lower layer than the chan_iax driver - having each of the channel drivers attempt to manage the IPv6/IPv4 fallback would get messy very quickly. At the same time, given that chan_iax tracks a peer based on its current address, there may be some ripple effects back up into chan_iax2. I'm not sure if this would have to change given Olle's patches.
Olle - what patches are you referring to? And can that work occur at a lower layer than the channel drivers?
</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, it has been on my list of things I wanted to do (don't ask me why) when starting to help IPv6-ify parts of Asterisk. I started it last year before or around when 11 was released. Never could get back to debugging it and polishing it up.
I saw Olle's post and wasn't sure either which branch to look at. I was kind of waiting for someone to respond like you did here. My initial reaction was "Oh crap. I hope that it doesn't have to be done in the channel driver. That should be handled elsewhere." From a quick look, it would seem that dnsmgr.c and acl.c would need to be changed and then the channel driver would need to be updated to work with those changes. So, I personally feel it is out of the scope of this work but it is something that needs to be fixed. I believe this is an overall issue that affects other parts of Asterisk and not just this channel driver.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 5th, 2013, 11:37 a.m. EDT, <b>Matt Jordan</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2660/diff/1/?file=41166#file41166line1890" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/channels/chan_iax2.c</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static inline struct iax2_user *user_ref(struct iax2_user *user)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1889</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="tb">        </span>ast_sockaddr_<span class="hl">to_sin</span>(&peer->addr, &<span class="hl">peer_</span>addr)<span class="hl">;</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1888</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="hl"><span class="tb">        </span><span class="tb">        </span>if (!</span>ast_sockaddr_<span class="hl">cmp_addr</span>(&peer->addr, &addr)<span class="hl">) {</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1890</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1891</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="tb">        </span>if ((peer_addr.sin_addr.s_addr == sin.sin_addr.s_addr) &&</pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1892</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="tb">        </span> (peer_addr.sin_port == sin.sin_port)) {</pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1893</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="tb">        </span><span class="tb">        </span>ast_copy_string(host, peer->name, len);</pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1889</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="tb">        </span><span class="tb">        </span>ast_copy_string(host, peer->name, len);</pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'm not sure if this matters, but this is a little bit different than the previous code.
Given an address, ast_sockaddr_cmp_addr will compare the entire sin_addr/sin6_addr field between the two addresses; it will not check the sin_port/sin6_port.
I'm not sure if the loss of the port comparison is important here or not. If not, feel free to close this issue - otherwise, a new "address/port" comparison function may be appropriate. </pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Good catch. It is probably better to use ast_sockaddr_cmp since that will compare the two structures instead of just the address of those two structures.</pre>
<br />
<p>- Michael</p>
<br />
<p>On July 5th, 2013, 9:54 p.m. EDT, Michael Young wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Michael Young.</div>
<p style="color: grey;"><i>Updated July 5, 2013, 9:54 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-22025">ASTERISK-22025</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This patch adds the ability to bind and communicate over IPv6 addresses using chan_iax2.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Successfully made calls using iax2 over IPv6 between two dev machines. SIP Softphone -> dev vm (iax2 ipv6) -> (iax2 ipv6) dev box -> SIP ITSP -> mobile phone</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/main/netsock.c <span style="color: grey">(393737)</span></li>
<li>/trunk/main/acl.c <span style="color: grey">(393737)</span></li>
<li>/trunk/include/asterisk/acl.h <span style="color: grey">(393737)</span></li>
<li>/trunk/contrib/realtime/mysql/iaxfriends.sql <span style="color: grey">(393737)</span></li>
<li>/trunk/channels/iax2/parser.c <span style="color: grey">(393737)</span></li>
<li>/trunk/channels/iax2/include/parser.h <span style="color: grey">(393737)</span></li>
<li>/trunk/channels/iax2/include/iax2.h <span style="color: grey">(393737)</span></li>
<li>/trunk/channels/chan_iax2.c <span style="color: grey">(393737)</span></li>
<li>/trunk/CHANGES <span style="color: grey">(393737)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2660/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>