summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-02-04 17:22:10 -0600
committerJohn Southworth <john.southworth@vyatta.com>2011-02-04 17:22:10 -0600
commit37f358df1b69d683cacadf4a60b1dd33c4862bcd (patch)
treee0f5d5bb60ebc1417581a7399e229dcb9867b277
parent326adb40c4c3056836db7b827980234eac87204f (diff)
downloadvyatta-op-vpn-37f358df1b69d683cacadf4a60b1dd33c4862bcd.tar.gz
vyatta-op-vpn-37f358df1b69d683cacadf4a60b1dd33c4862bcd.zip
Fix handling of IKE SA's in show commands
-rw-r--r--lib/OPMode.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/OPMode.pm b/lib/OPMode.pm
index d790bb3..6d75afe 100644
--- a/lib/OPMode.pm
+++ b/lib/OPMode.pm
@@ -853,7 +853,7 @@ sub display_ike_sa_brief {
my $lip = $th{$connectid}->{_lip};
$peerid = $th{$connectid}->{_peerid};
my $tunnel = "$peerid-$lip";
-
+ next if ($th{$connectid}->{_ikestate} eq 'down');
if (not exists $tunhash{$tunnel}) {
$tunhash{$tunnel}=[];
}
@@ -877,8 +877,8 @@ EOH
printf "%-39s %-39s\n", $peerid, $myid;
print <<EOH;
--------------------------------------- ----------------------------------------
- Tunnel State ISAKMP# Encrypt Hash NAT-T A-Time L-Time
- ------ ----- ------- ------- ---- ----- ------ ------
+ State Encrypt Hash NAT-T A-Time L-Time
+ ----- ------- ---- ----- ------ ------
EOH
for my $tunnel (tunSort(@{$tunhash{$connid}})){
(my $tunnum, my $state, my $isakmpnum, my $enc,
@@ -900,8 +900,8 @@ EOH
}
my $atime = $life - $expire;
$atime = 0 if ($atime == $life);
- printf " %-7s %-6s %-8s %-8s %-5s %-6s %-7s %-7s\n",
- $tunnum, $state, $isakmpnum, $encp, $hashp, $nattp, $atime, $life;
+ printf " %-6s %-8s %-5s %-6s %-7s %-7s\n",
+ $state, $encp, $hashp, $nattp, $atime, $life;
}
print <<EOH;
--------------------------------------------------------------------------------