diff options
author | Ermal <eri@pfsense.org> | 2011-09-01 16:07:07 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-09-01 16:07:07 +0000 |
commit | 9150f7c55e0f9b6500784a011b08ed688e0c9859 (patch) | |
tree | 1de8e0e4f2519571d6675b15ec368d079bd4f675 /config/snort/snort_preprocessors.php | |
parent | 8b8335b73cf3d8b8756fdc98e039e0e6f70e5407 (diff) | |
download | pfsense-packages-9150f7c55e0f9b6500784a011b08ed688e0c9859.tar.gz pfsense-packages-9150f7c55e0f9b6500784a011b08ed688e0c9859.tar.bz2 pfsense-packages-9150f7c55e0f9b6500784a011b08ed688e0c9859.zip |
Correct some code in preprocessort page
Diffstat (limited to 'config/snort/snort_preprocessors.php')
-rw-r--r-- | config/snort/snort_preprocessors.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/config/snort/snort_preprocessors.php b/config/snort/snort_preprocessors.php index df4e9b6a..80a72628 100644 --- a/config/snort/snort_preprocessors.php +++ b/config/snort/snort_preprocessors.php @@ -1,7 +1,7 @@ <?php /* $Id$ */ /* - snort_interfaces.php + snort_preprocessors.php part of m0n0wall (http://m0n0.ch/wall) Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>. @@ -46,7 +46,10 @@ $a_nat = &$config['installedpackages']['snortglobal']['rule']; $id = $_GET['id']; if (isset($_POST['id'])) $id = $_POST['id']; - +if (is_null($id)) { + header("Location: /snort/snort_interfaces.php"); + exit; +} if (isset($_GET['dup'])) { $id = $_GET['dup']; $after = $_GET['dup']; @@ -130,7 +133,6 @@ if (isset($id) && $a_nat[$id]) { /* convert fake interfaces to real */ $if_real = snort_get_real_interface($pconfig['interface']); - $snort_uuid = $pconfig['uuid']; /* alert file */ @@ -138,15 +140,14 @@ $d_snortconfdirty_path = "/var/run/snort_conf_{$snort_uuid}_{$if_real}.dirty"; if ($_POST["Submit"]) { - /* check for overlaps */ + $natent = array(); /* if no errors write to conf */ if (!$input_errors) { - $natent = array(); /* repost the options already in conf */ - if ($pconfig['interface'] != "") { $natent['interface'] = $pconfig['interface']; } + $natent['uuid'] = $pconfig['uuid']; + $natent['interface'] = $pconfig['interface']; if ($pconfig['enable'] != "") { $natent['enable'] = $pconfig['enable']; } - if ($pconfig['uuid'] != "") { $natent['uuid'] = $pconfig['uuid']; } if ($pconfig['descr'] != "") { $natent['descr'] = $pconfig['descr']; } if ($pconfig['performance'] != "") { $natent['performance'] = $pconfig['performance']; } if ($pconfig['blockoffenders7'] != "") { $natent['blockoffenders7'] = $pconfig['blockoffenders7']; } |