diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2008-06-05 09:32:33 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2008-06-05 09:32:33 +0000 |
commit | f4e6bc26b224c7365c97aec58f95660911123634 (patch) | |
tree | 21eac86b4838e68f0aa83460693ed515f78acc20 /usr | |
parent | 20fdc10f3761081f423bfc3a38e2ebe7a2aa3055 (diff) | |
download | pfsense-f4e6bc26b224c7365c97aec58f95660911123634.zip pfsense-f4e6bc26b224c7365c97aec58f95660911123634.tar.gz |
If the Interface is not WAN remove static route on change
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/vpn_ipsec_edit.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/local/www/vpn_ipsec_edit.php b/usr/local/www/vpn_ipsec_edit.php index 4cba538..aa1810d 100755 --- a/usr/local/www/vpn_ipsec_edit.php +++ b/usr/local/www/vpn_ipsec_edit.php @@ -209,6 +209,13 @@ if ($_POST) { $ipsecent['interface'] = $pconfig['interface']; pconfig_to_address($ipsecent['local-subnet'], $_POST['localnet'], $_POST['localnetmask']); $ipsecent['remote-subnet'] = $_POST['remotenet'] . "/" . $_POST['remotebits']; + /* if the remote gateway changed and the interface is not WAN then remove route */ + /* the vpn_ipsec_configure() handles adding the route */ + if($_POST['interface'] <> "wan") { + if($ipsecent['remote-gateway'] <> $_POST['remotegw']) { + mwexec("/sbin/route delete -host {$ipsecent['remote-gateway']}"); + } + } $ipsecent['remote-gateway'] = $_POST['remotegw']; $ipsecent['p1']['mode'] = $_POST['p1mode']; |