summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-07-06 15:26:55 +0200
committerSeth Mos <seth.mos@xs4all.nl>2009-07-06 15:26:55 +0200
commit7fc26246d6c49141b056fc34486b3de9b8006789 (patch)
tree887569069472898fbffb43d2db9e1235e6f69d2c /usr
parent70bf5abed1761476947dd7dc4cccf8e092222e26 (diff)
downloadpfsense-7fc26246d6c49141b056fc34486b3de9b8006789.zip
pfsense-7fc26246d6c49141b056fc34486b3de9b8006789.tar.gz
Fix ipsec vpn phase1 post code so that we correctly try to delete the old static route if required.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/vpn_ipsec_phase1.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php
index b92d18e..20ddd9b 100644
--- a/usr/local/www/vpn_ipsec_phase1.php
+++ b/usr/local/www/vpn_ipsec_phase1.php
@@ -64,6 +64,7 @@ if (isset($p1index) && $a_phase1[$p1index])
// don't copy the ikeid on dup
if (!isset($_GET['dup']))
$pconfig['ikeid'] = $a_phase1[$p1index]['ikeid'];
+
$old_ph1ent = $a_phase1[$p1index];
$pconfig['disabled'] = isset($a_phase1[$p1index]['disabled']);
@@ -266,8 +267,8 @@ if ($_POST) {
/* if the remote gateway changed and the interface is not WAN then remove route */
/* the vpn_ipsec_configure() handles adding the route */
if ($pconfig['interface'] <> "wan") {
- if($ph1ent['remote-gateway'] <> $pconfig['remotegw']) {
- mwexec("/sbin/route delete -host {$ph1ent['remote-gateway']}");
+ if($old_ph1ent['remote-gateway'] <> $pconfig['remotegw']) {
+ mwexec("/sbin/route delete -host {$oldph1ent['remote-gateway']}");
}
}
@@ -313,7 +314,7 @@ if ($_POST) {
if (is_array($a_phase2) && (count($a_phase2))) {
foreach ($a_phase2 as $phase2) {
if($phase2['ikeid'] == $ph1ent['ikeid']) {
- log_error("Reload {$ph1ent['descr']} tunnels");
+ log_error("Reload {$ph1ent['descr']} tunnel(s)");
$old_ph1ent['remote-gateway'] = resolve_retry($old_ph1ent['remote-gateway']);
$old_phase2 = $phase2;
reload_tunnel_spd_policy ($ph1ent, $phase2, $old_ph1ent, $old_phase2);
OpenPOWER on IntegriCloud