mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
showrequestfromblocklist.dat: Modify regex for added space in
log-prefix. Signed-off-by: Rob Brewer <rob.brewer@ipfire.org> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
committed by
Stefan Schantl
parent
98d50c03e7
commit
3e0cb28fc6
@@ -161,8 +161,8 @@ my $blaoklist = $cgiparams{blocklist};
|
||||
if (!$skip)
|
||||
{
|
||||
while (<FILE>) {
|
||||
if (/^${monthstr} ${daystr} ..:..:.. [\w\-]+ kernel:.*BLKLST_(\w+)IN=.*/) {
|
||||
if($1 eq $blocklist){
|
||||
if (/^${monthstr} ${daystr} ..:..:.. [\w\-]+ kernel:.*BLKLST_(\w+)\s?IN=.*/) {
|
||||
if($1 eq $blacklist){
|
||||
$log[$lines] = $_;
|
||||
$lines++;
|
||||
}
|
||||
@@ -186,8 +186,8 @@ if ($multifile) {
|
||||
}
|
||||
if (!$skip) {
|
||||
while (<FILE>) {
|
||||
if (/^${monthstr} ${daystr} ..:..:.. [\w\-]+ kernel:.*BLKLST_(\w+)IN=.*/) {
|
||||
if($1 eq $blocklist){
|
||||
if (/^${monthstr} ${daystr} ..:..:.. [\w\-]+ kernel:.*BLKLST_(\w+)\s?IN=.*/) {
|
||||
if($1 eq $blacklist){
|
||||
$log[$lines] = $_;
|
||||
$lines++;
|
||||
}
|
||||
@@ -308,9 +308,8 @@ $lines = 0;
|
||||
foreach $_ (@slice) {
|
||||
$a = $_;
|
||||
# Check whether valid ipv4 or ipv6 address
|
||||
if (($_ =~ /BLKLST_(\w+)IN=/)) {
|
||||
if($1 eq $blocklist) {
|
||||
|
||||
if (($_ =~ /BLKLST_(\w+)\s?IN=/)) {
|
||||
if($1 eq $blacklist) {
|
||||
my $in = '-'; my $out = '-';
|
||||
my $srcaddr = ''; my $dstaddr = '';
|
||||
my $protostr = '';
|
||||
|
||||
Reference in New Issue
Block a user