summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/vpn_ipsec.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php
index a2e22e4..36986b1 100755
--- a/usr/local/www/vpn_ipsec.php
+++ b/usr/local/www/vpn_ipsec.php
@@ -74,6 +74,10 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_ipsec[$_GET['id']]) {
+ /* remove static route if interface is not WAN */
+ if($a_ipsec[$_GET['id']]['interface'] <> "wan") {
+ mwexec("/sbin/route delete -host {$$a_ipsec[$_GET['id']]['remote-gateway']}");
+ }
unset($a_ipsec[$_GET['id']]);
filter_configure();
write_config();
OpenPOWER on IntegriCloud