diff options
author | Ermal Luçi <eri@pfsense.org> | 2013-04-03 02:56:12 -0700 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2013-04-03 02:56:12 -0700 |
commit | 24d8c77d3615783a03bca7e78891f964c59fbcfd (patch) | |
tree | 499b88499a1fefdb1af5abfaf425ec7c074c0178 /usr/local/www | |
parent | ae5f96c807010d6bf208717d5b18f053d439ed54 (diff) | |
parent | 30ca7b7ebcb6d48a6bd8bc57ddffcf6c64c68e7b (diff) | |
download | pfsense-24d8c77d3615783a03bca7e78891f964c59fbcfd.zip pfsense-24d8c77d3615783a03bca7e78891f964c59fbcfd.tar.gz |
Merge pull request #499 from phil-davis/master
Resync relevant OpenVPN instances when gateway group settings are modified
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/system_gateway_groups.php | 9 | ||||
-rwxr-xr-x | usr/local/www/system_gateway_groups_edit.php | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/usr/local/www/system_gateway_groups.php b/usr/local/www/system_gateway_groups.php index d59be30..63a95e3 100755 --- a/usr/local/www/system_gateway_groups.php +++ b/usr/local/www/system_gateway_groups.php @@ -43,6 +43,7 @@ require("guiconfig.inc"); require_once("functions.inc"); require_once("filter.inc"); require_once("shaper.inc"); +require_once("openvpn.inc"); if (!is_array($config['gateways']['gateway_group'])) $config['gateways']['gateway_group'] = array(); @@ -68,6 +69,14 @@ if ($_POST) { $savemsg = get_std_save_message($retval); if ($retval == 0) clear_subsystem_dirty('staticroutes'); + + foreach ($a_gateway_groups as $gateway_group) { + $gw_subsystem = 'gwgroup.' . $gateway_group['name']; + if (is_subsystem_dirty($gw_subsystem)) { + openvpn_resync_gwgroup($gateway_group['name']); + clear_subsystem_dirty($gw_subsystem); + } + } } } diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php index 37662f4..b470f11 100755 --- a/usr/local/www/system_gateway_groups_edit.php +++ b/usr/local/www/system_gateway_groups_edit.php @@ -138,6 +138,7 @@ if ($_POST) { $a_gateway_groups[] = $gateway_group; mark_subsystem_dirty('staticroutes'); + mark_subsystem_dirty('gwgroup.' . $gateway_group['name']); write_config(); |