diff options
author | robiscool <robrob2626@yahoo.com> | 2010-03-13 17:53:57 -0800 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2010-03-13 17:54:35 -0800 |
commit | 448a530be437cfde416c62ccf6460395887af384 (patch) | |
tree | aab723eef9d4d51a921c121491c5e79f8c55717d /config/snort-dev/snort_interfaces_edit.php | |
parent | a611f8b7560b30a7c975dce2c12c9651d5452025 (diff) | |
download | pfsense-packages-448a530be437cfde416c62ccf6460395887af384.tar.gz pfsense-packages-448a530be437cfde416c62ccf6460395887af384.tar.bz2 pfsense-packages-448a530be437cfde416c62ccf6460395887af384.zip |
snort-dev, major rewites of startup code started, protected bootup code started
Diffstat (limited to 'config/snort-dev/snort_interfaces_edit.php')
-rw-r--r-- | config/snort-dev/snort_interfaces_edit.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/config/snort-dev/snort_interfaces_edit.php b/config/snort-dev/snort_interfaces_edit.php index 9d2301f0..6bdb0dc7 100644 --- a/config/snort-dev/snort_interfaces_edit.php +++ b/config/snort-dev/snort_interfaces_edit.php @@ -121,7 +121,7 @@ if (isset($_GET['dup'])) /* convert fake interfaces to real */ $if_real = convert_friendly_interface_to_real_interface_name($pconfig['interface']); -if ($_POST["Submit"]) { +if ($_POST['Submit']) { /* input validation */ // if(strtoupper($_POST['proto']) == "TCP" or strtoupper($_POST['proto']) == "UDP" or strtoupper($_POST['proto']) == "TCP/UDP") { @@ -277,24 +277,29 @@ if ($_POST["Submit"]) { write_config(); // stop_service("snort"); - if ($pconfig['interface'] != "") { + if ($pconfig['interface'] != '' && $id != '') { sync_snort_package_all(); + } - if ($pconfig['interface'] != "") { + if ($pconfig['interface'] != '' && $id != '') { header("Location: /snort/snort_interfaces_edit.php?id=$id"); }else{ touch($d_natconfdirty_path); header("Location: /snort/snort_interfaces.php"); + } exit; } } if ($_POST["Submit2"]) { - sync_snort_package_all(); + if ($id != '') + { + sync_snort_package_all(); + } sleep(1); - exec("/bin/sh /usr/local/etc/rc.d/snort.sh restart {$id}{$if_real}"); + exec("/bin/sh /usr/local/etc/rc.d/snort.sh start {$id}{$if_real}"); header("Location: /snort/snort_interfaces_edit.php?id=$id"); exit; } |