Commit 33550299 authored by Franco Fichtner's avatar Franco Fichtner

openvpn: plug interface plugging into the add/delete paths

This wasn't completely right before, trying to plug into rules
reload paths and caused issues with people adding/deleting their
OpenVPN devices, but the rules tab not properly indicating this
since OpenVPN has become a pluggable interface.
parent 63968b41
...@@ -732,6 +732,7 @@ function step12_submitphpaction() ...@@ -732,6 +732,7 @@ function step12_submitphpaction()
$config['openvpn']['openvpn-server'][] = $server; $config['openvpn']['openvpn-server'][] = $server;
openvpn_resync('server', $server); openvpn_resync('server', $server);
plugins_interfaces(false);
write_config(); write_config();
header("Location: vpn_openvpn_server.php"); header("Location: vpn_openvpn_server.php");
exit; exit;
......
...@@ -134,6 +134,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -134,6 +134,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (isset($id)) { if (isset($id)) {
openvpn_delete('client', $a_client[$id]); openvpn_delete('client', $a_client[$id]);
unset($a_client[$id]); unset($a_client[$id]);
plugins_interfaces(false);
write_config(); write_config();
} }
header("Location: vpn_openvpn_client.php"); header("Location: vpn_openvpn_client.php");
...@@ -146,6 +147,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -146,6 +147,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
unset($a_client[$rulei]); unset($a_client[$rulei]);
} }
} }
plugins_interfaces(false);
write_config(); write_config();
} }
header("Location: vpn_openvpn_client.php"); header("Location: vpn_openvpn_client.php");
...@@ -336,6 +338,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -336,6 +338,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} }
openvpn_resync('client', $client); openvpn_resync('client', $client);
plugins_interfaces(false);
write_config(); write_config();
header("Location: vpn_openvpn_client.php"); header("Location: vpn_openvpn_client.php");
......
...@@ -138,6 +138,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -138,6 +138,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (isset($a_server[$id])) { if (isset($a_server[$id])) {
openvpn_delete('server', $a_server[$id]); openvpn_delete('server', $a_server[$id]);
unset($a_server[$id]); unset($a_server[$id]);
plugins_interfaces(false);
write_config(); write_config();
} }
header("Location: vpn_openvpn_server.php"); header("Location: vpn_openvpn_server.php");
...@@ -402,6 +403,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -402,6 +403,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} }
openvpn_resync('server', $server); openvpn_resync('server', $server);
plugins_interfaces(false);
write_config(); write_config();
openvpn_resync_csc(); // dump client specific overrides, the required set may have changed openvpn_resync_csc(); // dump client specific overrides, the required set may have changed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment