diff options
-rw-r--r-- | lib/OPMode.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/OPMode.pm b/lib/OPMode.pm index 35710f9..f46fb28 100644 --- a/lib/OPMode.pm +++ b/lib/OPMode.pm @@ -622,9 +622,9 @@ 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 $ike_sa (reverse sort {$esp_hash{$a}{last_used} <=> $esp_hash{$b}{last_used}} keys %{$esp_hash{$connectid}}) { - foreach my $data (keys %{$esp_hash{$connectid}{$ike_sa}}) { - $tunnel_hash{$connectid}->{$data} = $esp_hash{$connectid}{$ike_sa}{$data} if ($data =~ /^_/); + foreach my $esp_sa (reverse 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 =~ /^_/); } my $atime = $tunnel_hash{$connectid}->{_lifetime} - $tunnel_hash{$connectid}->{_expire}; $tunnel_hash{$connectid}->{_state} = "up" if ($atime >= 0); |