} /* remove the phase1 entry */ unset($a_phase1[$_GET['p1index']]); vpn_ipsec_refresh_policies(); vpn_ipsec_configure(); write_config(); filter_configure(); header("Location: vpn_ipsec.php"); exit; } } if ($_GET['act'] == "delph2") { if ($a_phase2[$_GET['p2index']]) { /* remove the phase2 entry */ unset($a_phase2[$_GET['p2index']]); vpn_ipsec_refresh_policies(); vpn_ipsec_configure(); filter_configure(); write_config(); header("Location: vpn_ipsec.php"); exit; } } $pgtitle = array(gettext("VPN"), gettext("IPsec")); $statusurl = "diag_ipsec.php"; $logurl = "diag_logs_ipsec.php"; include "head.inc"; ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php
filter_configure(); $savemsg = get_std_save_message($retval); if ($retval == 0) { if (file_exists($d_ipsecconfdirty_path)) { unlink($d_ipsecconfdirty_path); } } } else { if ($_POST['submit']) { $pconfig = $_POST; $config['ipsec']['enable'] = $_POST['enable'] ? true : false; $config['ipsec']['ipcomp'] = $_POST['ipcomp'] ? true : false; write_config(); $retval = 0; config_lock(); $retval = vpn_ipsec_refresh_policies(); $retval = vpn_ipsec_configure(); config_unlock(); /* reload the filter in the background */ filter_configure(); $savemsg = get_std_save_message($retval); if ($retval == 0) { if (file_exists($d_ipsecconfdirty_path)) { unlink($d_ipsecconfdirty_path); } } } } } if ($_GET['act'] == "del") { if ($a_ipsec[$_GET['id']]) {