[17/20] ids.cgi: Sort whitelist entries

Message ID 20240910143748.3469271-18-michael.tremer@ipfire.org
State Accepted
Commit d2f7d18e338975fa5d6a6f89b3eb86378e124612
Headers
Series [01/20] suricata: Move the IPS into the mangle table |

Commit Message

Michael Tremer Sept. 10, 2024, 2:37 p.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 html/cgi-bin/ids.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi
index 08db95595..b18f239e6 100644
--- a/html/cgi-bin/ids.cgi
+++ b/html/cgi-bin/ids.cgi
@@ -1253,7 +1253,7 @@  END
 			my $col = "";
 
 			# Loop through all entries of the hash.
-			while( (my $key) = each %ignored)  {
+			foreach my $key (sort { $ignored{$a}[0] <=> $ignored{$b}[0] } keys %ignored)  {
 				# Assign data array positions to some nice variable names.
 				my $address = $ignored{$key}[0];
 				my $remark = $ignored{$key}[1];