[OpenSIPS-Devel] [ opensips-Bugs-2474548 ] [nat_traversal] client_nat_test("2") shouldn't match port

SourceForge.net noreply at sourceforge.net
Tue Oct 27 11:14:24 CET 2009


Bugs item #2474548, was opened at 2008-12-29 11:52
Message generated for change (Settings changed) made by dan_pascu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2474548&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
>Status: Open
Resolution: Postponed
Priority: 3
Private: No
Submitted By: Iñaki Baz Castillo (ibc_sf)
Assigned to: Dan (dan_pascu)
Summary: [nat_traversal] client_nat_test("2") shouldn't match port

Initial Comment:
nat_traversal client_nat_test() function has the following parameter:

--------
1 - tests if client has a private IP address (as defined by RFC1918) in the Contact field of the SIP message. 

2 - tests if client has contacted OpenSIPS from an address that is different from the one in the Via field. Both the IP and port are compared by this test.

4 - tests if client has a private IP address (as defined by RFC1918) in the top Via field of the SIP message.
---------


Imagine we use client_nat_test(2) and there is a phone with public IP using SIP TCP. This client will ALWAYS detected as "natted" since the source port will never match its listening port (5060, the port indicated in Via sent-by field).

I think that the port shouldn't be matched. Also note that nathelper nat_uac_test() function has two values for same purpose:

--------
2 - the "received" test is used: address in Via is compared against source IP address of signaling 

16 - test if the source port is different from the port in Via
--------

nat_uac_test(2) and nat_uac_test(18) is valid for UDP clients while in case of TCP clients the only valid value is nat_uac_test(2).


So I suggest to split the nat_traversal client_nat_test() parameter 2 into 2 and 8, so it would be:

--------
1 - tests if client has a private IP address (as defined by RFC1918) in the Contact field of the SIP message. 

2 - tests if client has contacted OpenSIPS from an IP that is different from the one in the Via field.

4 - tests if client has a private IP address (as defined by RFC1918) in the top Via field of the SIP message.

8- test if the source port is different from the port in Via.
---------

----------------------------------------------------------------------

Comment By: SourceForge Robot (sf-robot)
Date: 2009-10-27 04:24

Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2474548&group_id=232389



More information about the Devel mailing list