From 2d7cfca67f3efac87ae25372c610341fe45980df Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 12 Jun 2024 16:52:50 -0700 Subject: [PATCH] Prevent duplicate also-notify and allow-transfer IPs --- bind8/bind8-lib.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bind8/bind8-lib.pl b/bind8/bind8-lib.pl index 1f85e9250..496b46c88 100755 --- a/bind8/bind8-lib.pl +++ b/bind8/bind8-lib.pl @@ -1988,6 +1988,8 @@ if (@transfer) { } } if (@notify) { + my %done; + @notify = grep { !$done{$_->{'name'}}++ } @notify; my $also = { 'name' => 'also-notify', 'type' => 1, 'members' => \@notify}; @@ -1996,6 +1998,8 @@ if (@notify) { 'values' => [ 'yes' ] }); } if (@transfer) { + my %done; + @transfer = grep { !$done{$_->{'name'}}++ } @transfer; my $allow = { 'name' => 'allow-transfer', 'type' => 1, 'members' => \@transfer };