diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-14 22:48:10 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-14 22:48:10 -0400 |
commit | 8fff5a1363f6a893c389e670cfd3f16694bb7373 (patch) | |
tree | 7d7034735cf3e1ef52b64541d7403d2d6e28fe3b /config/snort | |
parent | 1a48c72b884c24be94609ac4796e64bf1bd3b74a (diff) | |
download | pfsense-packages-8fff5a1363f6a893c389e670cfd3f16694bb7373.tar.gz pfsense-packages-8fff5a1363f6a893c389e670cfd3f16694bb7373.tar.bz2 pfsense-packages-8fff5a1363f6a893c389e670cfd3f16694bb7373.zip |
Move VIEW button for flowbits file so it is updated after SAVE command.
Diffstat (limited to 'config/snort')
-rwxr-xr-x | config/snort/snort_rulesets.php | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/config/snort/snort_rulesets.php b/config/snort/snort_rulesets.php index c4208628..934ac90e 100755 --- a/config/snort/snort_rulesets.php +++ b/config/snort/snort_rulesets.php @@ -93,17 +93,6 @@ if (!file_exists("{$snortdir}/rules/" . GPL_FILE_PREFIX . "community.rules")) if (($snortdownload == 'off') || ($a_nat[$id]['ips_policy_enable'] != 'on')) $policy_select_disable = "disabled"; -if ($a_nat[$id]['autoflowbitrules'] == 'on') { - if (file_exists("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$flowbit_rules_file}") && - filesize("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$flowbit_rules_file}") > 0) { - $btn_view_flowb_rules = " title=\"" . gettext("View flowbit-required rules") . "\""; - } - else - $btn_view_flowb_rules = " disabled"; -} -else - $btn_view_flowb_rules = " disabled"; - // If a Snort VRT policy is enabled and selected, remove all Snort VRT // rules from the configured rule sets to allow automatic selection. if ($a_nat[$id]['ips_policy_enable'] == 'on') { @@ -233,6 +222,18 @@ if ($_POST['selectall']) { // if auto-SID Mgmt is enabled. $cat_mods = snort_sid_mgmt_auto_categories($a_nat[$id], FALSE); +// Enable the VIEW button for auto-flowbits file if we have a valid flowbits file +if ($a_nat[$id]['autoflowbitrules'] == 'on') { + if (file_exists("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$flowbit_rules_file}") && + filesize("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$flowbit_rules_file}") > 0) { + $btn_view_flowb_rules = " title=\"" . gettext("View flowbit-required rules") . "\""; + } + else + $btn_view_flowb_rules = " disabled"; +} +else + $btn_view_flowb_rules = " disabled"; + $if_friendly = convert_friendly_interface_to_friendly_descr($a_nat[$id]['interface']); $pgtitle = gettext("Snort: Interface {$if_friendly} - Categories"); include_once("head.inc"); |