]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
showrequestfromblocklist.dat: Modify regex for added space in
authorRob Brewer <rob.brewer@ipfire.org>
Sat, 5 Mar 2022 21:18:42 +0000 (21:18 +0000)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 7 Jul 2022 15:26:14 +0000 (17:26 +0200)
log-prefix.

Signed-off-by: Rob Brewer <rob.brewer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/logs.cgi/showrequestfromblocklist.dat

index d189a78d46e02c742d079956f6b2bd0f57e0b894..4f8264acecf61c88c42215ca28d28d5de216318d 100755 (executable)
@@ -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 = '';