[OpenSIPS-Users] IP check in FixContact (nat_traversal.c)

Dan Pascu dan at ag-projects.com
Wed Feb 25 10:49:05 CET 2009


I changed it to test the whole address and skip fixing contact only if the 
address is the same. Let me know if you have any more problems.

On Tuesday 24 February 2009, Thomas Gelf wrote:
> Hi list,
>
> I had some trouble using fix_contact (from nat_traversal modul) with
> clients using STUN behind symmetric NAT setting Contact to "correct"
> IP and wrong port number. There is a hardcoded check in the FixContact
>
> function silently ignoring my fix_contact()-call in such scenarios:
> > if(newiplen==uri.host.len && memcmp(uri.host.s,newip,newiplen)==0)
>
> Imo this check should be relaxed/extended to compare ip AND/OR port
> changes. As I'm not used to write C code I just removed this check
> (as I'm calling fix_contact() only where necessary this should also
> be fine) and right now fix_contact() works great and does what it is
> expected to do.
>
> Same issue should also to be found in OpenSER's fix_contact belonging
> to the mediaproxy module.
>
> Best regards
> Thomas Gelf
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



-- 
Dan



More information about the Users mailing list