From 968e77119702765f9ec2859718bfa0fa443b2591 Mon Sep 17 00:00:00 2001 From: Jason Hendry Date: Thu, 9 Apr 2015 09:36:11 +0100 Subject: Bug:540 correct the order of ESP SA array by removing the reverse directive --- lib/OPMode.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/OPMode.pm') diff --git a/lib/OPMode.pm b/lib/OPMode.pm index fb62cbb..f871533 100644 --- a/lib/OPMode.pm +++ b/lib/OPMode.pm @@ -651,7 +651,7 @@ sub process_tunnels{ # For each tunnel, loop through all ESP SA's and extract data from one most recently used foreach my $connectid (keys %esp_hash) { - foreach my $esp_sa (reverse sort {$esp_hash{$a}{last_used} <=> $esp_hash{$b}{last_used}} keys %{$esp_hash{$connectid}}) { + foreach my $esp_sa (sort {$esp_hash{$a}{last_used} <=> $esp_hash{$b}{last_used}} keys %{$esp_hash{$connectid}}) { foreach my $data (keys %{$esp_hash{$connectid}{$esp_sa}}) { $tunnel_hash{$connectid}->{$data} = $esp_hash{$connectid}{$esp_sa}{$data} if ($data =~ /^_/); } -- cgit v1.2.3