mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
FS-502: fix nat acl count check to check against the number of nat acls
This commit is contained in:
parent
82c4c4cc67
commit
e11550e761
@ -2471,7 +2471,7 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
|
||||
sofia_clear_pflag(profile, PFLAG_STUN_AUTO_DISABLE);
|
||||
}
|
||||
} else if (!strcasecmp(var, "apply-nat-acl")) {
|
||||
if (profile->acl_count < SOFIA_MAX_ACL) {
|
||||
if (profile->nat_acl_count < SOFIA_MAX_ACL) {
|
||||
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 {
|
||||
@ -3472,7 +3472,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
} else if (!strcasecmp(var, "context")) {
|
||||
profile->context = switch_core_strdup(profile->pool, val);
|
||||
} else if (!strcasecmp(var, "apply-nat-acl")) {
|
||||
if (profile->acl_count < SOFIA_MAX_ACL) {
|
||||
if (profile->nat_acl_count < SOFIA_MAX_ACL) {
|
||||
if (!profile->extsipip && profile->sipip && 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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user