summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2013-04-03 02:56:12 -0700
committerErmal Luçi <eri@pfsense.org>2013-04-03 02:56:12 -0700
commit24d8c77d3615783a03bca7e78891f964c59fbcfd (patch)
tree499b88499a1fefdb1af5abfaf425ec7c074c0178 /usr/local/www
parentae5f96c807010d6bf208717d5b18f053d439ed54 (diff)
parent30ca7b7ebcb6d48a6bd8bc57ddffcf6c64c68e7b (diff)
downloadpfsense-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-xusr/local/www/system_gateway_groups.php9
-rwxr-xr-xusr/local/www/system_gateway_groups_edit.php1
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();
OpenPOWER on IntegriCloud