From 8a4fec9d13cb8bda11a6248296274d4559450731 Mon Sep 17 00:00:00 2001 From: Selva Nair Date: Sat, 14 Jan 2023 10:34:04 -0500 Subject: [PATCH] Remove restriction of num_configs related to management_port_offset Since we started finding a free port dynamically, management_port_offset is used only for making an initial hint. The limit applied to num_configs base don this does not make sense any longer. Also the current code does not work as expected as we allow changing of management_port_offset from the settings menu. Signed-off-by: Selva Nair --- openvpn_config.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/openvpn_config.c b/openvpn_config.c index f319cc0..59aa7f9 100644 --- a/openvpn_config.c +++ b/openvpn_config.c @@ -414,7 +414,6 @@ BuildFileList() int recurse_depth = 20; /* maximum number of levels below config_dir to recurse into */ int flags = 0; static int root_gp, system_gp, persistent_gp; - int max_configs = (1<<16) - o.mgmt_port_offset; if (o.silent_connection) issue_warnings = false; @@ -465,14 +464,6 @@ BuildFileList() if (o.num_configs == 0 && issue_warnings) ShowLocalizedMsg(IDS_NFO_NO_CONFIGS, o.config_dir, o.global_config_dir); - /* More than max_configs are ignored in the menu listing */ - if (o.num_configs > max_configs) - { - if (issue_warnings) - ShowLocalizedMsg(IDS_ERR_MANY_CONFIGS, max_configs); - o.num_configs = max_configs; /* management-port cant handle more -- ignore the rest */ - } - ActivateConfigGroups(); issue_warnings = false;