aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-04-17 19:20:54 -0400
committerErmal <eri@pfsense.org>2014-04-28 08:03:39 +0000
commit72b92fc14c0a5718a4b54afbde2121af6309db6a (patch)
tree57aa997d80b6bace86e0eab1c20cbd5797b0f86f
parent20249fe233afa9b42193a9249ecf4cac21ead9f4 (diff)
downloadpfsense-packages-72b92fc14c0a5718a4b54afbde2121af6309db6a.tar.gz
pfsense-packages-72b92fc14c0a5718a4b54afbde2121af6309db6a.tar.bz2
pfsense-packages-72b92fc14c0a5718a4b54afbde2121af6309db6a.zip
Add reminder to apply IP REP blocklist changes.
-rw-r--r--config/snort/snort_ip_reputation.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/config/snort/snort_ip_reputation.php b/config/snort/snort_ip_reputation.php
index 6ed78bba..3de8c661 100644
--- a/config/snort/snort_ip_reputation.php
+++ b/config/snort/snort_ip_reputation.php
@@ -85,6 +85,7 @@ if ($_POST['mode'] == 'blist_add' && isset($_POST['iplist'])) {
if (!$input_errors) {
$a_nat[$id]['blist_files']['item'][] = basename($_POST['iplist']);
write_config("Snort pkg: added new blacklist file for IP REPUTATION preprocessor.");
+ mark_subsystem_dirty('snort_iprep');
}
}
else
@@ -109,6 +110,7 @@ if ($_POST['mode'] == 'wlist_add' && isset($_POST['iplist'])) {
if (!$input_errors) {
$a_nat[$id]['wlist_files']['item'][] = basename($_POST['iplist']);
write_config("Snort pkg: added new whitelist file for IP REPUTATION preprocessor.");
+ mark_subsystem_dirty('snort_iprep');
}
}
else
@@ -122,6 +124,7 @@ if ($_POST['blist_del'] && is_numericint($_POST['list_id'])) {
$pconfig = $_POST;
unset($a_nat[$id]['blist_files']['item'][$_POST['list_id']]);
write_config("Snort pkg: deleted blacklist file for IP REPUTATION preprocessor.");
+ mark_subsystem_dirty('snort_iprep');
$pconfig['blist_files'] = $a_nat[$id]['blist_files'];
$pconfig['wlist_files'] = $a_nat[$id]['wlist_files'];
}
@@ -130,11 +133,12 @@ if ($_POST['wlist_del'] && is_numericint($_POST['list_id'])) {
$pconfig = $_POST;
unset($a_nat[$id]['wlist_files']['item'][$_POST['list_id']]);
write_config("Snort pkg: deleted whitelist file for IP REPUTATION preprocessor.");
+ mark_subsystem_dirty('snort_iprep');
$pconfig['wlist_files'] = $a_nat[$id]['wlist_files'];
$pconfig['blist_files'] = $a_nat[$id]['blist_files'];
}
-if ($_POST['save']) {
+if ($_POST['save'] || $_POST['apply']) {
$natent = array();
$natent = $pconfig;
@@ -163,6 +167,9 @@ if ($_POST['save']) {
// Soft-restart Snort to live-load new variables
snort_reload_config($a_nat[$id]);
$pconfig = $natent;
+
+ // We have saved changes and done a soft restart, so clear "dirty" flag
+ clear_subsystem_dirty('snort_iprep');
}
else
$pconfig = $_POST;
@@ -189,6 +196,11 @@ if ($savemsg)
<input type="hidden" id="mode" name="mode" value="" />
<input name="iplist" id="iplist" type="hidden" value="" />
<input name="list_id" id="list_id" type="hidden" value="" />
+
+<?php if (is_subsystem_dirty('snort_iprep')): ?><p>
+<?php print_info_box_np(gettext("A change has been made to blacklist or whitelist file assignments.") . "<br/>" . gettext("You must apply the changes in order for them to take effect."));?>
+<?php endif; ?>
+
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
@@ -399,7 +411,6 @@ if ($savemsg)
</td>
</tr>
</table>
-</form>
<script type="text/javascript">
Event.observe(
@@ -489,6 +500,7 @@ function wlistComplete(req) {
</script>
+</form>
<?php include("fend.inc"); ?>
</body>
</html>