From ebfbd38c7ca62b0cdfec684f8b33a30e692a2d62 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Mon, 7 Jul 2008 18:26:26 -0700 Subject: partial fix for bugs 3044, 3047, 3048: minor show command output header changes. fix for bug 3440: regex now matches IP, hostname, or ID. --- src/command_proc_show_vpn.cc | 6 ++++++ src/xsl/show_vpn_ike_sa.xsl | 2 +- src/xsl/show_vpn_ike_secrets.xsl | 2 +- src/xsl/show_vpn_ipsec_sa.xsl | 4 ++-- src/xsl/show_vpn_ipsec_sa_statistics.xsl | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/command_proc_show_vpn.cc b/src/command_proc_show_vpn.cc index 6f2ed0a..9ee7a35 100644 --- a/src/command_proc_show_vpn.cc +++ b/src/command_proc_show_vpn.cc @@ -560,12 +560,18 @@ CommandProcShowVPN::process_conf(bool debug) src = "0.0.0.0"; } } + else if (line.find("leftid=") != string::npos) { + src = line.substr(pos + 1, line.length() - pos - 2); + } else if (line.find("right=") != string::npos) { dst=line.substr(pos+1,line.length()-pos-2); if (dst == "%any") { dst = "0.0.0.0"; } } + else if (line.find("rightid=") != string::npos) { + dst = line.substr(pos + 1, line.length() - pos - 2); + } else if (line.find("rightsubnet=") != string::npos) { rightnet=line.substr(pos+1,line.length()-pos-2); } diff --git a/src/xsl/show_vpn_ike_sa.xsl b/src/xsl/show_vpn_ike_sa.xsl index 3a4779f..38f88e0 100644 --- a/src/xsl/show_vpn_ike_sa.xsl +++ b/src/xsl/show_vpn_ike_sa.xsl @@ -47,7 +47,7 @@ &newln; - Local IP Peer IP State Encrypt Hash NAT-T A-Time L-Time + Local Peer State Encrypt Hash NAT-T A-Time L-Time &newln; -------- ------- ----- ------- ---- ----- ------ ------ &newln; diff --git a/src/xsl/show_vpn_ike_secrets.xsl b/src/xsl/show_vpn_ike_secrets.xsl index 4c610bd..3cf5511 100644 --- a/src/xsl/show_vpn_ike_secrets.xsl +++ b/src/xsl/show_vpn_ike_secrets.xsl @@ -38,7 +38,7 @@ &newln; -Local IP Peer IP Secret +Local Peer Secret &newln; -------- ------- ------ &newln; diff --git a/src/xsl/show_vpn_ipsec_sa.xsl b/src/xsl/show_vpn_ipsec_sa.xsl index 22eabb0..79d6d6f 100644 --- a/src/xsl/show_vpn_ipsec_sa.xsl +++ b/src/xsl/show_vpn_ipsec_sa.xsl @@ -59,7 +59,7 @@ &newln; - Peer IP Tunnel# Dir SPI Encrypt Hash NAT-T A-Time L-Time + Peer Tunnel# Dir SPI Encrypt Hash NAT-T A-Time L-Time &newln; ------- ------- --- --- ------- ---- ----- ------ ------ &newln; @@ -107,7 +107,7 @@ Conn Name: &newln; State: &newln; - Peer IP: &newln; + Peer: &newln; Direction: &newln; Source Net: &newln; diff --git a/src/xsl/show_vpn_ipsec_sa_statistics.xsl b/src/xsl/show_vpn_ipsec_sa_statistics.xsl index a1fe889..75c421b 100644 --- a/src/xsl/show_vpn_ipsec_sa_statistics.xsl +++ b/src/xsl/show_vpn_ipsec_sa_statistics.xsl @@ -42,7 +42,7 @@ &newln; -Peer IP Dir SRC Network DST Network Bytes +Peer Dir SRC Network DST Network Bytes &newln; ------- --- ----------- ----------- ----- &newln; -- cgit v1.2.3