[Freeswitch-svn] [commit] r9221 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Mon Aug 4 15:20:34 EDT 2008
Author: anthm
Date: Mon Aug 4 15:20:33 2008
New Revision: 9221
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
Log:
update
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Mon Aug 4 15:20:33 2008
@@ -1088,7 +1088,11 @@
}
} else if (!strcasecmp(var, "apply-nat-acl")) {
if (profile->acl_count < SOFIA_MAX_ACL) {
- profile->nat_acl[profile->nat_acl_count++] = switch_core_strdup(profile->pool, val);
+ if (!profile->extsipip && switch_check_network_list_ip(profile->sipip, val)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Not adding acl %s because it's the local network\n", val);
+ } else {
+ profile->nat_acl[profile->nat_acl_count++] = switch_core_strdup(profile->pool, val);
+ }
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Max acl records of %d reached\n", SOFIA_MAX_ACL);
}
@@ -1645,7 +1649,11 @@
profile->context = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "apply-nat-acl")) {
if (profile->acl_count < SOFIA_MAX_ACL) {
- profile->nat_acl[profile->nat_acl_count++] = switch_core_strdup(profile->pool, val);
+ if (!profile->extsipip && switch_check_network_list_ip(profile->sipip, val)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Not adding acl %s because it's the local network\n", val);
+ } else {
+ profile->nat_acl[profile->nat_acl_count++] = switch_core_strdup(profile->pool, val);
+ }
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Max acl records of %d reached\n", SOFIA_MAX_ACL);
}
More information about the Freeswitch-svn
mailing list