summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/vyos-update-nhrp.pl12
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) {