diff options
author | Kim Hagen <khagen@multi-development.com> | 2015-02-17 15:06:36 +0100 |
---|---|---|
committer | Kim Hagen <khagen@multi-development.com> | 2015-02-17 15:06:36 +0100 |
commit | 62132a44e43c08a9b4a379510c7fcea1cc0aa07d (patch) | |
tree | 24d7e4c5d6f859c156d551a5344fa9e88ef494e1 | |
parent | 87c7b798636f07f2f678b1296e9f8b44b54827a2 (diff) | |
download | vyos-nhrp-62132a44e43c08a9b4a379510c7fcea1cc0aa07d.tar.gz vyos-nhrp-62132a44e43c08a9b4a379510c7fcea1cc0aa07d.zip |
Replace count elements in hash for a counting loop...
-rw-r--r-- | scripts/vyos-update-nhrp.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/vyos-update-nhrp.pl b/scripts/vyos-update-nhrp.pl index 9e83c5f..1d44274 100644 --- a/scripts/vyos-update-nhrp.pl +++ b/scripts/vyos-update-nhrp.pl @@ -279,8 +279,10 @@ sub ipsec_config { $config_prot->setLevel("vpn ipsec esp-group $esp_group"); my @proposals = $config_prot->listNodes("proposal"); - my %proposals = @proposals; - my $x = scalar(keys %proposals); + my $x = 0; + foreach my $e (@proposals) { + $x ++; + } my $y = 0; push(@conf_file, " --esp", " "); foreach my $proposal (@proposals) { @@ -355,8 +357,10 @@ sub ipsec_config { if ($ike_group) { $config_prot->setLevel("vpn ipsec ike-group $ike_group"); my @proposals = $config_prot->listNodes("proposal"); - my %proposals = @proposals; - my $x = scalar(keys %proposals); + my $x = 0; + foreach my $e (@proposals) { + $x ++; + } my $y = 0; push(@conf_file, " --ike", " "); foreach my $proposal (@proposals) { |