diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php index 856799b2a1..a615fb5f92 100644 --- a/usr/local/www/vpn_ipsec_phase1.php +++ b/usr/local/www/vpn_ipsec_phase1.php @@ -329,6 +329,10 @@ if ($_POST) { if (!$input_errors) { $ph1ent['ikeid'] = $pconfig['ikeid']; $ph1ent['iketype'] = $pconfig['iketype']; + if ($pconfig['iketype'] != 'ikev1') + unset($ph1ent['mode']); + else + $ph1ent['mode'] = $pconfig['mode']; $ph1ent['disabled'] = $pconfig['disabled'] ? true : false; $ph1ent['interface'] = $pconfig['interface']; /* if the remote gateway changed and the interface is not WAN then remove route */ @@ -344,7 +348,6 @@ if ($_POST) { else $ph1ent['remote-gateway'] = $pconfig['remotegw']; - $ph1ent['mode'] = $pconfig['mode']; $ph1ent['protocol'] = $pconfig['protocol']; $ph1ent['myid_type'] = $pconfig['myid_type'];