summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsenecaux <lsenecaux@users.noreply.github.com>2021-03-01 17:54:23 +0100
committerGitHub <noreply@github.com>2021-03-01 17:54:23 +0100
commit8c879a23f9438f1d0d2acf56134be816ece69e05 (patch)
tree7c01bb4ae282399008a832447d40a83e1f913070
parent6f591c7b909cac87e1914fa644b3f3f3bd7ed763 (diff)
downloadvyatta-op-vpn-8c879a23f9438f1d0d2acf56134be816ece69e05.tar.gz
vyatta-op-vpn-8c879a23f9438f1d0d2acf56134be816ece69e05.zip
Update OPMode.pm
IPv6 regex is not only made up of digits This change allows a correct display of the command 'show vpn ike sa' with IPv6 remote peer
-rw-r--r--lib/OPMode.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/OPMode.pm b/lib/OPMode.pm
index 013e896..4d41a91 100644
--- a/lib/OPMode.pm
+++ b/lib/OPMode.pm
@@ -33,7 +33,7 @@ sub conv_id {
my $peer = pop(@_);
if ( $peer =~ /\d+\.\d+\.\d+\.\d+/ ){
$peer = $peer;
- } elsif ($peer =~ /\d+\:\d+\:\d+\:\d+\:\d+\:\d+\:\d+\:\d+/){
+ } elsif ($peer =~ /([A-Fa-f0-9]+)\:([A-Fa-f0-9]+)\:([A-Fa-f0-9]+)\:([A-Fa-f0-9]+)\:([A-Fa-f0-9]+)\:([A-Fa-f0-9]+)\:([A-Fa-f0-9]+)\:([A-Fa-f0-9]+)\:/){
$peer = $peer;
} elsif ($peer =~ /\%any/){
$peer = "any";