diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 8 | ||||
-rw-r--r-- | etc/inc/filter_log.inc | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 0b2b883..a3cb67a 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -2432,7 +2432,7 @@ block quick from any to <snort2c> label "Block snort2c hosts" EOD; - $ipfrules .= filter_process_carp_rules(); + $ipfrules .= filter_process_carp_rules($log); $ipfrules .= "\n# SSH lockout\n"; if(is_array($config['system']['ssh']) && !empty($config['system']['ssh']['port'])) { @@ -3157,17 +3157,17 @@ function filter_process_carp_nat_rules() { return $lines; } -function filter_process_carp_rules() { +function filter_process_carp_rules($log) { global $g, $config; if(isset($config['system']['developerspew'])) { $mt = microtime(); - echo "filter_process_carp_rules() being called $mt\n"; + echo "filter_process_carp_rules($log) being called $mt\n"; } $lines = ""; /* return if there are no carp configured items */ if (!empty($config['hasync']) or !empty($config['virtualip']['vip'])) { - $lines .= "block in log quick proto carp from (self) to any\n"; + $lines .= "block in $log quick proto carp from (self) to any\n"; $lines .= "pass quick proto carp\n"; $lines .= "pass quick proto pfsync\n"; } diff --git a/etc/inc/filter_log.inc b/etc/inc/filter_log.inc index 11adfae..2bfc895 100644 --- a/etc/inc/filter_log.inc +++ b/etc/inc/filter_log.inc @@ -248,15 +248,14 @@ function buffer_rules_clear() { function find_rule_by_number_buffer($rulenum, $type){ global $g, $buffer_rules_rdr, $buffer_rules_normal; - if ($type == "rdr") - { + if ($type == "rdr") { $ruleString = $buffer_rules_rdr["@".$rulenum]; //TODO: get the correct 'description' part of a RDR log line. currently just first 30 characters.. $rulename = substr($ruleString,0,30); } else { $ruleString = $buffer_rules_normal["@".$rulenum]; list(,$rulename,) = explode("\"",$ruleString); - $rulename = str_replace("USER_RULE: ","<img src=\"/themes/".$g['theme'].'/images/icons/icon_frmfld_user.png\" width="11" height="12" title="USER_RULE" alt="USER_RULE"/> ',$rulename); + $rulename = str_replace("USER_RULE: ",'<img src="/themes/'.$g['theme'].'/images/icons/icon_frmfld_user.png" width="11" height="12" title="USER_RULE" alt="USER_RULE"/> ',$rulename); } return "@".$rulenum." ".$rulename; } |