$ldescr) { if (!empty($config['ipsec']["ipsec_{$lkey}"])) $pconfig["ipsec_{$lkey}"] = $config['ipsec']["ipsec_{$lkey}"]; } $pconfig['failoverforcereload'] = isset($config['ipsec']['failoverforcereload']); $pconfig['acceptunencryptedmainmode'] = isset($config['ipsec']['acceptunencryptedmainmode']); $pconfig['maxmss_enable'] = isset($config['system']['maxmss_enable']); $pconfig['maxmss'] = $config['system']['maxmss']; if ($_POST) { unset($input_errors); $pconfig = $_POST; if (!in_array($pconfig['ipsec_dmn'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for Daemon debug."; } if (!in_array($pconfig['ipsec_mgr'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for SA Manager debug."; } if (!in_array($pconfig['ipsec_ike'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for IKE SA debug."; } if (!in_array($pconfig['ipsec_chd'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for IKE Child SA debug."; } if (!in_array($pconfig['ipsec_job'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for Job Processing debug."; } if (!in_array($pconfig['ipsec_cfg'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for Configuration backend debug."; } if (!in_array($pconfig['ipsec_knl'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for Kernel Interface debug."; } if (!in_array($pconfig['ipsec_net'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for Networking debug."; } if (!in_array($pconfig['ipsec_asn'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for ASN Encoding debug."; } if (!in_array($pconfig['ipsec_enc'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for Message encoding debug."; } if (!in_array($pconfig['ipsec_imc'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for Integrity checker debug."; } if (!in_array($pconfig['ipsec_imv'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for Integrity Verifier debug."; } if (!in_array($pconfig['ipsec_pts'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for Platform Trust Service debug."; } if (!in_array($pconfig['ipsec_tls'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for TLS Handler debug."; } if (!in_array($pconfig['ipsec_esp'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for IPsec Traffic debug."; } if (!in_array($pconfig['ipsec_lib'], array('0', '1', '2', '3', '4', '5'), true)) { $input_errors[] = "A valid value must be specified for StrongSwan Lib debug."; } if (isset($pconfig['maxmss'])) { if (!is_numericint($pconfig['maxmss']) && $pconfig['maxmss'] <> '') { $input_errors[] = "An integer must be specified for Maximum MSS."; } if ($pconfig['maxmss'] <> '' && $pconfig['maxmss'] < 576 || $pconfig['maxmss'] > 65535) $input_errors[] = "An integer between 576 and 65535 must be specified for Maximum MSS"; } if (!$input_errors) { if($_POST['preferoldsa_enable'] == "yes") $config['ipsec']['preferoldsa'] = true; elseif (isset($config['ipsec']['preferoldsa'])) unset($config['ipsec']['preferoldsa']); if (is_array($config['ipsec'])) { foreach ($ipsec_loglevels as $lkey => $ldescr) { if (empty($_POST["ipsec_{$lkey}"])) { if (isset($config['ipsec']["ipsec_{$lkey}"])) unset($config['ipsec']["ipsec_{$lkey}"]); } else $config['ipsec']["ipsec_{$lkey}"] = $_POST["ipsec_{$lkey}"]; } } if($_POST['failoverforcereload'] == "yes") $config['ipsec']['failoverforcereload'] = true; elseif (isset($config['ipsec']['failoverforcereload'])) unset($config['ipsec']['failoverforcereload']); if($_POST['acceptunencryptedmainmode'] == "yes") $config['ipsec']['acceptunencryptedmainmode'] = true; elseif (isset($config['ipsec']['acceptunencryptedmainmode'])) unset($config['ipsec']['acceptunencryptedmainmode']); if($_POST['maxmss_enable'] == "yes") { $config['system']['maxmss_enable'] = true; $config['system']['maxmss'] = $_POST['maxmss']; } else { unset($config['system']['maxmss_enable']); unset($config['system']['maxmss']); } write_config(); $retval = 0; $retval = filter_configure(); if(stristr($retval, "error") <> true) $savemsg = get_std_save_message(gettext($retval)); else $savemsg = gettext($retval); vpn_ipsec_configure_preferoldsa(); vpn_ipsec_configure(); vpn_ipsec_configure_loglevels(); // header("Location: vpn_ipsec_settings.php"); // return; } } $pgtitle = array(gettext("VPN"),gettext("IPsec"),gettext("Settings")); $shortcut_section = "ipsec"; include("head.inc"); ?>
/>

$ldescr): ?>
\n"; foreach (array("Silent", "Audit", "Control", "Diag", "Raw", "Highest") as $lidx => $lvalue) { echo "\n"; } ?>

/>
/>
onclick="maxmss_checked(this)" />
" class="formfld unknown" />
  " />