diff options
author | Kim Hagen <kim.sidney@gmail.com> | 2016-02-09 07:02:04 -0500 |
---|---|---|
committer | Kim Hagen <kim.sidney@gmail.com> | 2016-02-09 07:02:04 -0500 |
commit | 78e111940c711c83ed83e6e0d833d2f59dd95791 (patch) | |
tree | 1f669bc7f358ca6dd3b490f53fb4ee830947cdc0 /scripts/vyos-update-nhrp.pl | |
parent | 15eacb98320bfee51a53db995273a3a677acf753 (diff) | |
download | vyos-nhrp-78e111940c711c83ed83e6e0d833d2f59dd95791.tar.gz vyos-nhrp-78e111940c711c83ed83e6e0d833d2f59dd95791.zip |
Fix "Smartmatch is experimental" more easy.
Diffstat (limited to 'scripts/vyos-update-nhrp.pl')
-rw-r--r-- | scripts/vyos-update-nhrp.pl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/vyos-update-nhrp.pl b/scripts/vyos-update-nhrp.pl index 2271bd1..c632b33 100644 --- a/scripts/vyos-update-nhrp.pl +++ b/scripts/vyos-update-nhrp.pl @@ -27,7 +27,6 @@ use POSIX; use File::Basename; use File::Compare; use NetAddr::IP; -use match::smart; use lib "/opt/vyatta/share/perl5/"; use Vyatta::Config; @@ -53,7 +52,7 @@ sub checkref { $config_nhrp_tun->setLevel("protocols nhrp tunnel"); my @nhrp_tunnels = $config_nhrp_tun->listNodes(); - if ($tun ~~ @nhrp_tunnels) { + if (any(@nhrp_tunnels) eq $tun) { print ("WARNING: Can't delete tunnel $tun, it is in use by NHRP config.\n"); exit 1; } @@ -105,7 +104,7 @@ sub configure_nhrp_tunnels { if (@nhrp_tunnels) { foreach my $nhrp_tunnel(@nhrp_tunnels) { - if ($nhrp_tunnel ~~ @tunnels) { + if (any(@tunnels) eq $nhrp_tunnel) { if ($config_tun->returnValue("$nhrp_tunnel encapsulation") eq "gre" && ! $config_tun->exists("$nhrp_tunnel remote-ip")) { my @conf_file = tunnel_config($nhrp_tunnel); open (my $fh,">>$conffile"); @@ -161,7 +160,7 @@ sub configure_nhrp_ipsec { my @ipsec_profile_tunnels = $config_ipsec_profile_tun->listNodes(); foreach my $ipsec_profile_tunnel(@ipsec_profile_tunnels) { - if ($ipsec_profile_tunnel ~~ @nhrp_tunnels) { + if (any(@nhrp_tunnels) eq $ipsec_profile_tunnel) { my @conf_file = ipsec_config($ipsec_profile, $ipsec_profile_tunnel); open (my $fh,">>$ipsecfile"); foreach (@conf_file) { |