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

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Feb 24 20:36:05 CET 2009


Hi Thomas,

this looks like a bug to me - indeed both IP and port should be checked 
in order to make sense to the check. Dan? any comments here?

I know for sure that the fix_nated_contact() from nathepler module works 
ok in such a scenario.

Regards,
Bogdan

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
>
>   




More information about the Users mailing list