[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [asterisk-dev] [Code Review] 4563: chan_sip: handle IPv4 mapped clients when NAT and IPv6 socket
From:       "Joshua Colp" <reviewboard () asterisk ! org>
Date:       2015-03-31 15:24:27
Message-ID: 20150331152427.12527.87979 () sonic ! digium ! api
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On March 31, 2015, 3:19 p.m., Michael Young wrote:
> > I would hold off on committing this patch as I feel it is not really a proper \
> > solution.  I believe that this is just short circuiting the conditional and \
> > always applying remapping if IPv6 is involved or not.  On the issue tracker, \
> > Valentin has provided some debug logs which, unless I am reading them wrong, \
> > point to a configuration error.  The IPv4 addresses are not being mapped to IPv6 \
> > at all according to the debug logs.
> 
> Joshua Colp wrote:
> If the socket is bound to :: they'll be IPv6 mapped. I've seen this in the PJSIP \
> world (where it's not supported).

To respond to myself: I also checked the ACL code which is used for the localnet \
stuff, and it seems to support IPv6 mapped addresses.


- Joshua


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4563/#review14973
-----------------------------------------------------------


On March 30, 2015, 2:23 p.m., Valentin Vidić wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4563/
> -----------------------------------------------------------
> 
> (Updated March 30, 2015, 2:23 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-18032
> https://issues.asterisk.org/jira/browse/ASTERISK-18032
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When udpbindaddr=:: is set Asterisk accepts IPv4 and IPv6 clients both stored in a \
> struct sockaddr_in6 with AF_INET6 family type. Current NAT code for IPv4 checks if \
> the socket type is AF_INET6 and thus fails to handle IPv4 mapped addresses \
> properly. The patch adds an additional check for this case allowing IPv4 clients to \
> be handled by NAT even when IPv6 is enabled. 
> 
> Diffs
> -----
> 
> /branches/11/channels/chan_sip.c 433794 
> 
> Diff: https://reviewboard.asterisk.org/r/4563/diff/
> 
> 
> Testing
> -------
> 
> Patch solves the problem of failing incoming calls on a local NATed installation \
> with IPv6 sockets enabled. 
> 
> Thanks,
> 
> Valentin Vidić
> 
> 


[Attachment #5 (text/html)]

<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/4563/">https://reviewboard.asterisk.org/r/4563/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On March 31st, 2015, 3:19 p.m. UTC, <b>Michael \
Young</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;">I would hold off on committing this patch as I feel it is not really a \
proper solution.  I believe that this is just short circuiting the conditional and \
always applying remapping if IPv6 is involved or not.  On the issue tracker, Valentin \
has provided some debug logs which, unless I am reading them wrong, point to a \
configuration error.  The IPv4 addresses are not being mapped to IPv6 at all \
according to the debug logs.</pre>  </blockquote>




 <p>On March 31st, 2015, 3:22 p.m. UTC, <b>Joshua Colp</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;">If the socket is bound \
to :: they&#39;ll be IPv6 mapped. I&#39;ve seen this in the PJSIP world (where \
it&#39;s not supported).</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;">To respond to myself: I \
also checked the ACL code which is used for the localnet stuff, and it seems to \
support IPv6 mapped addresses.</pre> <br />










<p>- Joshua</p>


<br />
<p>On March 30th, 2015, 2:23 p.m. UTC, Valentin Vidić 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.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By Valentin Vidić.</div>


<p style="color: grey;"><i>Updated March 30, 2015, 2:23 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-18032">ASTERISK-18032</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;">When udpbindaddr=:: is set Asterisk accepts IPv4 and IPv6 clients both \
stored in a struct sockaddr_in6 with AF_INET6 family type. Current NAT code for IPv4 \
checks if the socket type is AF_INET6 and thus fails to handle IPv4 mapped addresses \
properly. The patch adds an additional check for this case allowing IPv4 clients to \
be handled by NAT even when IPv6 is enabled.</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;">Patch solves the problem of failing incoming calls on a local NATed \
installation with IPv6 sockets enabled.</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>/branches/11/channels/chan_sip.c <span style="color: grey">(433794)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/4563/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic