]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-502: fix nat acl count check to check against the number of nat acls
authorMichael Jerris <mike@jerris.com>
Sun, 3 Oct 2010 23:06:56 +0000 (19:06 -0400)
committerMichael Jerris <mike@jerris.com>
Sun, 3 Oct 2010 23:06:56 +0000 (19:06 -0400)
src/mod/endpoints/mod_sofia/sofia.c

index c2fabd2333aa746a8b87c9da4a880251769f766a..38e62de4f8f9b10ca42f3f62f325913e00b10339 100644 (file)
@@ -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 {