diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-16 11:19:54 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-16 11:19:54 -0400 |
commit | b386e2d9ed7bf07807acde9cd68a467a6330fa1b (patch) | |
tree | 55d8908eff7a88a0d189740c09fbbc825b516f1a /config/snort | |
parent | 5b4e556a3d70ed46ecbc31baecd6e8a5858d5dc4 (diff) | |
download | pfsense-packages-b386e2d9ed7bf07807acde9cd68a467a6330fa1b.tar.gz pfsense-packages-b386e2d9ed7bf07807acde9cd68a467a6330fa1b.tar.bz2 pfsense-packages-b386e2d9ed7bf07807acde9cd68a467a6330fa1b.zip |
Do not lose MySQL settings when just disabling Barnyard2 on interface.
Diffstat (limited to 'config/snort')
-rw-r--r-- | config/snort/snort_barnyard.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/config/snort/snort_barnyard.php b/config/snort/snort_barnyard.php index f5d6f04c..4943f981 100644 --- a/config/snort/snort_barnyard.php +++ b/config/snort/snort_barnyard.php @@ -91,6 +91,27 @@ if (isset($id) && $a_nat[$id]) { } if ($_POST['save']) { + + // If disabling Barnyard2 on the interface, stop any + // currently running instance, then save the disabled + // state and exit. + if ($_POST['barnyard_enable'] != 'on') { + $a_nat[$id]['barnyard_enable'] = 'off'; + write_config("Snort pkg: modified Barnyard2 settings."); + snort_barnyard_stop($a_nat[$id], get_real_interface($a_nat[$id]['interface'])); + + // No need to rebuild rules for Barnyard2 changes + $rebuild_rules = false; + sync_snort_package_config(); + header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); + header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); + header( 'Cache-Control: no-store, no-cache, must-revalidate' ); + header( 'Cache-Control: post-check=0, pre-check=0', false ); + header( 'Pragma: no-cache' ); + header("Location: /snort/snort_barnyard.php"); + exit; + } + // Check that at least one output plugin is enabled if ($_POST['barnyard_mysql_enable'] != 'on' && $_POST['barnyard_syslog_enable'] != 'on' && $_POST['barnyard_bro_ids_enable'] != 'on' && $_POST['barnyard_enable'] == "on") |