<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div>Sure thing :) and your welcome.<br></div>
<div><br></div><div><br></div>
<div id="yahoo_quoted_3761203605" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Friday, April 6, 2018, 1:48:13 PM GMT+5:30, Bogdan-Andrei Iancu <bogdan@opensips.org> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv6964386205"><div>
<tt>Thanks Pasan for testing. I just did the backports. <br clear="none">
<br clear="none">
Let me know if there are any issue with the ipv6 tests here.<br clear="none">
<br clear="none">
Best regards,<br clear="none">
</tt>
<pre class="yiv6964386205moz-signature">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext" target="_blank" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
<div class="yiv6964386205yqt6634900286" id="yiv6964386205yqt75402"><div class="yiv6964386205moz-cite-prefix">On 04/06/2018 05:54 AM, Pasan Meemaduma
wrote:<br clear="none">
</div>
<blockquote type="cite">
<div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
<div>Hi Bogdan,</div>
<div><br clear="none">
</div>
<div>We applied your patch and it fixed the issue. Thank you.<br clear="none">
</div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div class="yiv6964386205yahoo_quoted" id="yiv6964386205yahoo_quoted_3927649546">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div> On Thursday, April 5, 2018, 6:16:17 PM GMT+5:30,
Bogdan-Andrei Iancu <a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-rfc2396E" ymailto="mailto:bogdan@opensips.org" target="_blank" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a> wrote: </div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>
<div id="yiv6964386205">
<div> <tt>Hi Pasan,<br clear="none">
<br clear="none">
I found some issues in how IPs are checked for
AF_INET6. Could you test this fix:<br clear="none">
<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext" target="_blank" href="https://github.com/OpenSIPS/opensips/commit/a69f6de764cefab7cb7179b2f439780e74082461">https://github.com/OpenSIPS/opensips/commit/a69f6de764cefab7cb7179b2f439780e74082461</a><br clear="none">
<br clear="none">
Thanks and regards,<br clear="none">
</tt>
<pre class="yiv6964386205moz-signature">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext" target="_blank" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
<div class="yiv6964386205yqt4301025621" id="yiv6964386205yqt97150">
<div class="yiv6964386205moz-cite-prefix">On
04/05/2018 01:24 PM, Pasan Meemaduma wrote:<br clear="none">
</div>
<blockquote type="cite">
<div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
<div>Hi Bogdan,</div>
<div><br clear="none">
</div>
<div>I just tried, and it still returns true. I
have put my debug line below,<br clear="none">
</div>
<div><br clear="none">
</div>
<div><span>Call: Request from NAT IP - From=xxx
from_uri=<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext">sip:xxxxx@voip2.exetel.com.au</a>
Auth_user=xx Request=xx
IP=2400:A240:0:1:6000:0:0:2
Via=2400:a240:0:1:6000::2 ID=545589626</span></div>
<div><span><br clear="none">
</span></div>
<div><span><br clear="none">
</span></div>
<div><span><br clear="none">
</span></div>
<div><span>Surprisingly I have another ipv6
address tested and it fails the nat test and
behave appropriately. I'll dump both request
contents as below,</span></div>
<div><span><br clear="none">
</span></div>
<div><span>not working one - <span>nat_uac_test
returns true</span></span></div>
<div><span><span><br clear="none">
</span><br clear="none">
</span></div>
<div><span><span>U 2018/04/05 15:06:20.982169
2400:a240:0:1:6000::2:5060 ->
240x:xx00:1d:f0::1:88:5060<br clear="none">
INVITE <a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext">sip:0x12345678@xx.xx.com.xx</a>
SIP/2.0.<br clear="none">
Via: SIP/2.0/UDP
[2400:a240:0:1:6000::2]:5060;branch=z9hG4bK1610101366.</span></span></div>
<div><span><span><span>Contact: <a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-rfc2396E"><sip:0xx0x0x0xx@[2400:A240:0:1:6000:0:0:2]></a>.</span><br clear="none">
</span></span></div>
<div><span><br clear="none">
</span></div>
<div>working one - nat_uac_test returns false<br clear="none">
</div>
<div><br clear="none">
</div>
<div><span>U 2018/04/05 15:11:11.480156
2406:3400:0:8:c5c9:bd6:4b95:7a5e:5060 ->
240x:xx00:1d:f0::1:88:5060<br clear="none">
INVITE <a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext">sip:0x12345678@xx.xx.com.xx</a>
SIP/2.0.<br clear="none">
Via: SIP/2.0/UDP
[240x:xx00:0:8:c5c9:bd6:4b95:7a5e]:5060;branch=z9hG4bK566727241.<br clear="none">
</span></div>
<div><span><span>Contact: <a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-rfc2396E"><sip:0x80x0xxxx@[240x:xx00:0:8:C5C9:BD6:4B95:7A5E]></a>.</span></span></div>
<div><span><span><br clear="none">
</span><br clear="none">
</span></div>
<div><span>Only difference I can spot is the
second ipv6 address is in fully stretch
format and mine in summarize format as
below, Not sure if its related. <br clear="none">
</span></div>
<div><span><br clear="none">
</span></div>
<div><span><br clear="none">
</span><span><span><span>2400:a240:0:1:6000::2</span></span></span></div>
<div><span><span>240x:xx00:0:8:c5c9:bd6:4b95:7a5e</span></span><br clear="none">
</div>
<div><br clear="none">
</div>
<div>Let me know if you need anything else.<br clear="none">
</div>
<div class="yiv6964386205yahoo_quoted" id="yiv6964386205yahoo_quoted_3075187359">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div> On Thursday, April 5, 2018, 3:37:24 PM
GMT+5:30, Bogdan-Andrei Iancu <a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-rfc2396E" ymailto="mailto:bogdan@opensips.org" target="_blank" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a>
wrote: </div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>
<div id="yiv6964386205">
<div> <tt>Hi Pasan,</tt><tt><br clear="none">
</tt><tt><br clear="none">
</tt><tt>19 is 16 + 2 +</tt><tt> 1 (as
tests) :</tt><tt><br clear="none">
</tt><tt><br clear="none">
</tt><tt><span class="yiv6964386205emphasis"><em>1</em></span></tt><tt>
- Contact header field is searched
for occurrence of RFC1918 / RFC6598
addresses.</tt><tt><span class="yiv6964386205emphasis"><em></em></span></tt><tt><br clear="none">
</tt><tt><span class="yiv6964386205emphasis"><em>2</em></span></tt><tt>
- the "received" test is used:
address in Via is compared against
source IP address of signaling</tt><tt><span class="yiv6964386205emphasis"><em></em></span></tt><tt><br clear="none">
</tt><tt><span class="yiv6964386205emphasis"><em>16</em></span></tt><tt>
- test if the source port is
different from the port in Via </tt><tt><br clear="none">
</tt><tt><br clear="none">
2 and 16 is checking IP versus IP,
so they are not affected by v4
versus v6.<br clear="none">
<br clear="none">
On test 1 I see no checks on v4 or
v6 - it simply checks the IP (as raw
bytes) against the know ipv4 private
classes.<br clear="none">
<br clear="none">
Could you try to remove the test 1
(use 18) and see if the test still
returns true ?<br clear="none">
<br clear="none">
Regards,<br clear="none">
</tt>
<pre class="yiv6964386205moz-signature">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext" target="_blank" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
<div class="yiv6964386205yqt9974701500" id="yiv6964386205yqt85869">
<div class="yiv6964386205moz-cite-prefix">On
04/05/2018 06:58 AM, Pasan
Meemaduma via Users wrote:<br clear="none">
</div>
<blockquote type="cite">
<div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
<div>Hi Guys,</div>
<div><br clear="none">
</div>
<div>Are nathelper module
functions ipv6 safe ? I'm
getting true for nat test with
following call for an ipv6
address which is a globally
unique unicast address.</div>
<div><br clear="none">
</div>
<div><span>nat_uac_test("19")</span></div>
<div><span><br clear="none">
</span><br clear="none">
</div>
</div>
<br clear="none">
<fieldset class="yiv6964386205mimeAttachmentHeader"></fieldset>
<br clear="none">
<pre>_______________________________________________
Users mailing list
<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-abbreviated" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a rel="nofollow" shape="rect" class="yiv6964386205moz-txt-link-freetext" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</div>
<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div>
<br clear="none">
</div></div></div>
</div>
</div></div></body></html>