diff options
-rwxr-xr-x | scripts/vyatta-show-vpn.pl | 6 | ||||
-rw-r--r-- | src/command_proc_show_vpn.cc | 6 | ||||
-rw-r--r-- | src/xsl/show_vpn_ike_sa.xsl | 2 | ||||
-rw-r--r-- | src/xsl/show_vpn_ike_secrets.xsl | 2 | ||||
-rw-r--r-- | src/xsl/show_vpn_ipsec_sa.xsl | 4 | ||||
-rw-r--r-- | src/xsl/show_vpn_ipsec_sa_statistics.xsl | 2 |
6 files changed, 14 insertions, 8 deletions
diff --git a/scripts/vyatta-show-vpn.pl b/scripts/vyatta-show-vpn.pl index 1e84c1f..df8477b 100755 --- a/scripts/vyatta-show-vpn.pl +++ b/scripts/vyatta-show-vpn.pl @@ -41,11 +41,11 @@ if ($arg0 eq 'secrets') { open(DAT, $secret_file); my @raw_data=<DAT>; close(DAT); - print "Local IP Peer IP Secret\n"; + print "Local Peer Secret\n"; print "-------- ------- ------\n"; foreach my $line (@raw_data) { if ($line =~ /PSK/) { - my ($lip, $pip, $secret) = $line =~ /^(\d+\.\d+\.\d+\.\d+)\s+(\d+\.\d+\.\d+\.\d+)\s+\:\s+PSK\s+(\"\S+\")/; + my ($lip, $pip, $secret) = $line =~ /^(\S+)\s+(\S+)\s+\:\s+PSK\s+(\"\S+\")/; printf "%-15s %-15s %s\n", $lip, $pip, $secret; } } @@ -77,7 +77,7 @@ if ($arg0 eq 'rsa-keys') { my $rsa_key_name = $vc->returnOrigValue("ipsec site-to-site peer $peer authentication rsa-key-name"); my $remote_key = $vc->returnOrigValue("rsa-keys rsa-key-name $rsa_key_name rsa-key"); print "=" x 80, "\n"; - print "Peer IP: $peer"; + print "Peer: $peer"; if (defined($rsa_key_name)) { print " ($rsa_key_name)"; } 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 @@ <xsl:template match="/"> <xsl:text>&newln;</xsl:text> - <xsl:text>Local IP Peer IP State Encrypt Hash NAT-T A-Time L-Time</xsl:text> + <xsl:text>Local Peer State Encrypt Hash NAT-T A-Time L-Time</xsl:text> <xsl:text>&newln;</xsl:text> <xsl:text>-------- ------- ----- ------- ---- ----- ------ ------</xsl:text> <xsl:text>&newln;</xsl:text> 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 @@ <xsl:template match="/"> <xsl:text>&newln;</xsl:text> -<xsl:text>Local IP Peer IP Secret</xsl:text> +<xsl:text>Local Peer Secret</xsl:text> <xsl:text>&newln;</xsl:text> <xsl:text>-------- ------- ------</xsl:text> <xsl:text>&newln;</xsl:text> 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 @@ <xsl:text>&newln;</xsl:text> <xsl:if test="$detail != 'y'"> - <xsl:text>Peer IP Tunnel# Dir SPI Encrypt Hash NAT-T A-Time L-Time</xsl:text> + <xsl:text>Peer Tunnel# Dir SPI Encrypt Hash NAT-T A-Time L-Time</xsl:text> <xsl:text>&newln;</xsl:text> <xsl:text>------- ------- --- --- ------- ---- ----- ------ ------</xsl:text> <xsl:text>&newln;</xsl:text> @@ -107,7 +107,7 @@ </xsl:if> <xsl:text>Conn Name: </xsl:text><xsl:value-of select="conn_name"/><xsl:text>&newln;</xsl:text> <xsl:text>State: </xsl:text><xsl:value-of select="../ike_state"/><xsl:text>&newln;</xsl:text> - <xsl:text>Peer IP: </xsl:text><xsl:value-of select="../peer_ip"/><xsl:text>&newln;</xsl:text> + <xsl:text>Peer: </xsl:text><xsl:value-of select="../peer_ip"/><xsl:text>&newln;</xsl:text> <xsl:text>Direction: </xsl:text><xsl:value-of select="dir"/><xsl:text>&newln;</xsl:text> <!--<xsl:text>Outbound interface: !!</xsl:text> <xsl:text>&newln;</xsl:text>--> <xsl:text>Source Net: </xsl:text><xsl:value-of select="left"/><xsl:text>&newln;</xsl:text> 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 @@ <xsl:template match="/"> <xsl:text>&newln;</xsl:text> -<xsl:text>Peer IP Dir SRC Network DST Network Bytes</xsl:text> +<xsl:text>Peer Dir SRC Network DST Network Bytes</xsl:text> <xsl:text>&newln;</xsl:text> <xsl:text>------- --- ----------- ----------- -----</xsl:text> <xsl:text>&newln;</xsl:text> |