summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-02-04 13:25:32 -0600
committerJohn Southworth <john.southworth@vyatta.com>2011-02-04 13:25:32 -0600
commit8517b03efeac29c690453d84e742609fbf33c370 (patch)
tree2efeb7375db9c6b6aa6cb2a498e5617bcea8b5f3 /lib
parent59f968256cceda3d8da6e70c5180520222c00f88 (diff)
downloadvyatta-op-vpn-8517b03efeac29c690453d84e742609fbf33c370.tar.gz
vyatta-op-vpn-8517b03efeac29c690453d84e742609fbf33c370.zip
Work on new IPsec operational mode script. Since protocol must be the same on local and remote we can show it on the brief output
Diffstat (limited to 'lib')
-rw-r--r--lib/OPMode.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/OPMode.pm b/lib/OPMode.pm
index 1127ed8..d790bb3 100644
--- a/lib/OPMode.pm
+++ b/lib/OPMode.pm
@@ -605,6 +605,7 @@ sub display_ipsec_sa_brief
$th{$connectid}->{_encryption},
$th{$connectid}->{_hash},
$th{$connectid}->{_lifetime},
+ $th{$connectid}->{_lproto},
$th{$connectid}->{_expire});
push (@{$tunhash{"$tunnel"}->{_tunnels}}, [ @tmp ]);
@@ -618,12 +619,12 @@ EOH
printf "%-39s %-39s\n", $peerid, $myid;
print <<EOH;
--------------------------------------- ----------------------------------------
- Tunnel State Bytes Out/In Encrypt Hash NAT-T A-Time L-Time
- ------ ----- ------------- ------- ---- ----- ------ ------
+ Tunnel State Bytes Out/In Encrypt Hash NAT-T A-Time L-Time Proto
+ ------ ----- ------------- ------- ---- ----- ------ ------ -----
EOH
for my $tunnel (tunSort(@{$tunhash{$connid}->{_tunnels}})){
(my $tunnum, my $state, my $inbytes, my $outbytes,
- my $enc, my $hash, my $life, my $expire) = @{$tunnel};
+ my $enc, my $hash, my $life, my $proto, my $expire) = @{$tunnel};
my $lip = $tunhash{$connid}->{_lip};
my $peerip = conv_ip($peerid);
my $natt = $tunhash{$connid}->{_natt};
@@ -650,9 +651,9 @@ EOH
}
my $atime = $life - $expire;
$atime = 0 if ($atime == $life);
- printf " %-7s %-6s %-14s %-8s %-5s %-6s %-7s %-7s\n",
+ printf " %-7s %-6s %-14s %-8s %-5s %-6s %-7s %-7s %-2s\n",
$tunnum, $state, $bytesp, $encp, $hashp, $nattp,
- $atime, $life;
+ $atime, $life, $proto;
}
print <<EOH;
--------------------------------------------------------------------------------