summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjules-vyos <vyos@ourhouse.org.uk>2017-07-03 15:01:31 +0100
committerjules-vyos <vyos@ourhouse.org.uk>2017-07-03 15:01:31 +0100
commit46c10df71f00f215d6aaa15a3b00e946679a0328 (patch)
tree8f907e839ec936d691983781fad8ea59439a0395
parentce1c285359947d4af3c2713482ba4927c29b93cd (diff)
downloadvyatta-op-vpn-46c10df71f00f215d6aaa15a3b00e946679a0328.tar.gz
vyatta-op-vpn-46c10df71f00f215d6aaa15a3b00e946679a0328.zip
Fix for T303 - 'show vpn ike status per warning: Using a hash as a reference is deprecated'
Newer version of perl doesn't like %hash->{item} syntax. Prefers $hash{item} instead.
-rw-r--r--lib/OPMode.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/OPMode.pm b/lib/OPMode.pm
index ed57ea2..e304b2f 100644
--- a/lib/OPMode.pm
+++ b/lib/OPMode.pm
@@ -837,8 +837,8 @@ sub get_connection_status
(my $peerid, my $tun) = @_;
my %th = get_tunnel_info_peer($peerid);
for my $peer ( keys %th ) {
- if (%{$th{$peer}}->{_tunnelnum} eq $tun){
- return %{$th{$peer}}->{_state};
+ if (${$th{$peer}}{_tunnelnum} eq $tun){
+ return ${$th{$peer}}{_state};
}
}
}
@@ -847,10 +847,10 @@ sub get_peer_ike_status
my ($peerid) = @_;
my %th = get_tunnel_info_peer($peerid);
for my $peer ( keys %th ) {
- if (%{$th{$peer}}->{_ikestate} eq 'up'){
+ if (${$th{$peer}}{_ikestate} eq 'up'){
return 'up';
}
- if (%{$th{$peer}}->{_ikestate} eq 'init'){
+ if (${$th{$peer}}{_ikestate} eq 'init'){
return 'init';
}
}
@@ -862,7 +862,7 @@ sub show_ipsec_sa_natt
my %tunnel_hash = get_tunnel_info();
my %tmphash = ();
for my $peer ( keys %tunnel_hash ) {
- if (%{$tunnel_hash{$peer}}->{_natt} == 1 ){
+ if (${$tunnel_hash{$peer}>{_natt} == 1 ){
$tmphash{$peer} = \%{$tunnel_hash{$peer}};
}
}
@@ -905,7 +905,7 @@ sub show_ike_sa_natt
my %tunnel_hash = get_tunnel_info();
my %tmphash = ();
for my $peer ( keys %tunnel_hash ) {
- if (%{$tunnel_hash{$peer}}->{_natt} == 1 ){
+ if (${$tunnel_hash{$peer}}{_natt} == 1 ){
$tmphash{$peer} = \%{$tunnel_hash{$peer}};
}
}