diff options
author | Kim Hagen <kim.sidney@gmail.com> | 2016-02-09 14:36:29 -0500 |
---|---|---|
committer | Kim Hagen <kim.sidney@gmail.com> | 2016-02-09 14:36:29 -0500 |
commit | ccb1b2ec5c2f4fa0a7ed7d148eeaa8a8451c32ad (patch) | |
tree | d613fda07ee9025b198066dd70f90ae3c9d43d7b | |
parent | 78e111940c711c83ed83e6e0d833d2f59dd95791 (diff) | |
download | vyos-nhrp-ccb1b2ec5c2f4fa0a7ed7d148eeaa8a8451c32ad.tar.gz vyos-nhrp-ccb1b2ec5c2f4fa0a7ed7d148eeaa8a8451c32ad.zip |
Fix "Smartmatch is experimental" no extra's needed.
-rw-r--r-- | scripts/vyos-update-nhrp.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/vyos-update-nhrp.pl b/scripts/vyos-update-nhrp.pl index c632b33..c6338fd 100644 --- a/scripts/vyos-update-nhrp.pl +++ b/scripts/vyos-update-nhrp.pl @@ -52,7 +52,7 @@ sub checkref { $config_nhrp_tun->setLevel("protocols nhrp tunnel"); my @nhrp_tunnels = $config_nhrp_tun->listNodes(); - if (any(@nhrp_tunnels) eq $tun) { + if (grep {$_ eq $tun} @nhrp_tunnels) { print ("WARNING: Can't delete tunnel $tun, it is in use by NHRP config.\n"); exit 1; } @@ -104,7 +104,7 @@ sub configure_nhrp_tunnels { if (@nhrp_tunnels) { foreach my $nhrp_tunnel(@nhrp_tunnels) { - if (any(@tunnels) eq $nhrp_tunnel) { + if (grep {$_ eq $nhrp_tunnel} @tunnels) { 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"); @@ -160,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 (any(@nhrp_tunnels) eq $ipsec_profile_tunnel) { + if (grep {$_ eq $ipsec_profile_tunnel} @nhrp_tunnels) { my @conf_file = ipsec_config($ipsec_profile, $ipsec_profile_tunnel); open (my $fh,">>$ipsecfile"); foreach (@conf_file) { |