diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-03-31 15:34:14 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-03-31 15:34:14 -0700 |
commit | fc44c318accece9822158569cd34099539763225 (patch) | |
tree | 7ee4cc53fcfa22968f5911e22075c1e92ad646af | |
parent | d007266706640f5397580a44542f6fd0a6b30462 (diff) | |
download | vyatta-op-vpn-fc44c318accece9822158569cd34099539763225.tar.gz vyatta-op-vpn-fc44c318accece9822158569cd34099539763225.zip |
Fix Bug 5500 Unable to establish a VPN connection from a remote peer with a
dynamic IP when using FQDN identifier for remote end
* fix op-mode part
-rw-r--r-- | scripts/vyatta-show-ipsec-status.pl | 2 | ||||
-rwxr-xr-x | scripts/vyatta-show-vpn.pl | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/scripts/vyatta-show-ipsec-status.pl b/scripts/vyatta-show-ipsec-status.pl index 7ae384a..1701bad 100644 --- a/scripts/vyatta-show-ipsec-status.pl +++ b/scripts/vyatta-show-ipsec-status.pl @@ -72,7 +72,7 @@ sub relate_intfs_with_localips { } } if ($ip_found == 0) { - print "(no IP on interface used as local-ip for any VPN peer)"; + print "(no IP on interface statically configured as local-ip for any VPN peer)"; } print "\n"; } diff --git a/scripts/vyatta-show-vpn.pl b/scripts/vyatta-show-vpn.pl index 6f896c2..f1c1078 100755 --- a/scripts/vyatta-show-vpn.pl +++ b/scripts/vyatta-show-vpn.pl @@ -44,10 +44,14 @@ if ($arg0 eq 'secrets') { print "Local Peer Secret\n"; print "-------- ------- ------\n"; foreach my $line (@raw_data) { - if ($line =~ /PSK/) { - my ($lip, $pip, $secret) = $line =~ /^(\S+)\s+(\S+)\s+\:\s+PSK\s+(\"\S+\")/; - printf "%-15s %-15s %s\n", $lip, $pip, $secret; - } + if ($line =~ /PSK/) { + my ($lip, $pip, $secret) = ('', '', ''); + ($secret) = $line =~ /.*:\s+PSK\s+(\"\S+\")/; + ($lip, $pip) = $line =~ /^(\S+)\s+(\S+)\s+\:\s+PSK\s+\"\S+\"/; + $lip = '0.0.0.0' if ! defined $lip; + $pip = '0.0.0.0' if ! defined $pip; + printf "%-15s %-15s %s\n", $lip, $pip, $secret; + } } exit 0; } |