<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div>Hi Bogdan,</div><div><br></div><div>I just tried, and it still returns true. I have put my debug line below,<br></div><div><br></div><div><span>Call: Request from NAT IP - From=xxx from_uri=sip:xxxxx@voip2.exetel.com.au 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></span></div><div><span><br></span></div><div><span><br></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></span></div><div><span>not working one - <span>nat_uac_test returns true</span></span></div><div><span><span><br></span><br></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>INVITE sip:0x12345678@xx.xx.com.xx SIP/2.0.<br>Via: SIP/2.0/UDP [2400:a240:0:1:6000::2]:5060;branch=z9hG4bK1610101366.</span></span></div><div><span><span><span>Contact: <sip:0xx0x0x0xx@[2400:A240:0:1:6000:0:0:2]>.</span><br></span></span></div><div><span><br></span></div><div>working one - nat_uac_test returns false<br></div>
            <div><br></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>INVITE sip:0x12345678@xx.xx.com.xx SIP/2.0.<br>Via: SIP/2.0/UDP [240x:xx00:0:8:c5c9:bd6:4b95:7a5e]:5060;branch=z9hG4bK566727241.<br></span></div><div><span><span>Contact: <sip:0x80x0xxxx@[240x:xx00:0:8:C5C9:BD6:4B95:7A5E]>.</span></span></div><div><span><span><br></span><br></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></span></div><div><span><br></span></div><div><span><br></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></div><div><br></div><div>Let me know if you need anything else.<br></div>
            
            <div id="yahoo_quoted_3075187359" class="yahoo_quoted">
                <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 <bogdan@opensips.org> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div id="yiv4180183792"><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></tt><tt><br clear="none">
    </tt><tt><span class="yiv4180183792emphasis"><em>1</em></span></tt><tt> - Contact
      header field is searched for occurrence of RFC1918 / RFC6598
      addresses.</tt><tt><span class="yiv4180183792emphasis"><em></em></span></tt><tt><br clear="none">
    </tt><tt><span class="yiv4180183792emphasis"><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="yiv4180183792emphasis"><em></em></span></tt><tt><br clear="none">
    </tt><tt><span class="yiv4180183792emphasis"><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="yiv4180183792moz-signature">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a rel="nofollow" shape="rect" class="yiv4180183792moz-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="yiv4180183792moz-txt-link-freetext" target="_blank" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
    <div class="yiv4180183792yqt9974701500" id="yiv4180183792yqt85869"><div class="yiv4180183792moz-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="yiv4180183792mimeAttachmentHeader"></fieldset>
      <br clear="none">
      <pre>_______________________________________________
Users mailing list
<a rel="nofollow" shape="rect" class="yiv4180183792moz-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="yiv4180183792moz-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></body></html>