summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-02-25 18:32:06 -0600
committerJohn Southworth <john.southworth@vyatta.com>2011-02-25 18:32:06 -0600
commit50c9069691a190494a6135a56bfad7713cf92310 (patch)
tree348dd569834916d5879ba037a2bce1d278da36f5
parent0789a8ea33b01843f474dfdd2f2c7a62075b6fc9 (diff)
downloadvyatta-op-vpn-50c9069691a190494a6135a56bfad7713cf92310.tar.gz
vyatta-op-vpn-50c9069691a190494a6135a56bfad7713cf92310.zip
add a function to get the ike state of a peer
-rw-r--r--lib/OPMode.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/OPMode.pm b/lib/OPMode.pm
index 8f17a7a..1d61800 100644
--- a/lib/OPMode.pm
+++ b/lib/OPMode.pm
@@ -561,6 +561,17 @@ sub get_connection_status
}
}
}
+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'){
+ return 'up';
+ }
+ }
+ return 'down';
+}
sub show_ipsec_sa_natt
{