summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Hendry <jhendryUK@users.noreply.github.com>2015-04-10 09:57:02 +0100
committerJason Hendry <jhendryUK@users.noreply.github.com>2015-04-10 09:57:02 +0100
commitd4ba8d8603aca58605e2bccd9d9b4b8dc91c9cd2 (patch)
treebcabe7c675a9c7db1ca8e32ce670a0e6995dee0d
parent6beb3ab0fc2c2480b421874864307f1c77307d6b (diff)
parent968e77119702765f9ec2859718bfa0fa443b2591 (diff)
downloadvyatta-op-vpn-d4ba8d8603aca58605e2bccd9d9b4b8dc91c9cd2.tar.gz
vyatta-op-vpn-d4ba8d8603aca58605e2bccd9d9b4b8dc91c9cd2.zip
Merge pull request #13 from jhendryUK/fix_order_of_esp_sa_array
Bug:540 correct the order of ESP SA array by removing the reverse direct...
-rw-r--r--lib/OPMode.pm2
1 files changed, 1 insertions, 1 deletions
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 =~ /^_/);
}