diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2008-06-05 09:38:32 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2008-06-05 09:38:32 +0000 |
commit | 9528a92d85e139e39e1a67d934738818e2f72a37 (patch) | |
tree | 8ad18b5e2c64b28ee205dfd4630ff7fc231f835d | |
parent | f4e6bc26b224c7365c97aec58f95660911123634 (diff) | |
download | pfsense-9528a92d85e139e39e1a67d934738818e2f72a37.zip pfsense-9528a92d85e139e39e1a67d934738818e2f72a37.tar.gz |
Remove static route on deletion
-rwxr-xr-x | usr/local/www/vpn_ipsec.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php index c7c3711..a4065b3 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(); |