Revision
17421
Author
brian
Date
2010-04-27 13:56:37 -0500 (Tue, 27 Apr 2010)

Log Message

 evil nat scenarios

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c (17420 => 17421)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	2010-04-27 18:56:16 UTC (rev 17420)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	2010-04-27 18:56:37 UTC (rev 17421)
@@ -1751,6 +1751,11 @@
 			}
 		}
 
+		if (!is_nat && sip && sip->sip_via && sip->sip_via->v_port &&
+			atoi(sip->sip_via->v_port) == 5060 && network_port != 5060 ) {
+			is_nat = "via port";
+		}
+
 		if (!is_nat && profile->nat_acl_count) {
 			uint32_t x = 0;
 			int ok = 1;

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (17420 => 17421)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	2010-04-27 18:56:16 UTC (rev 17420)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	2010-04-27 18:56:37 UTC (rev 17421)
@@ -1364,6 +1364,11 @@
 		}
 	}
 
+	if (!is_nat && sip && sip->sip_via && sip->sip_via->v_port &&
+		atoi(sip->sip_via->v_port) == 5060 && network_port != 5060 ) {
+		is_nat = "via port";
+	}
+
 	if (!is_nat && profile->nat_acl_count) {
 		uint32_t x = 0;
 		int ok = 1;