forked from Mirror/pve-network
sdn: powerdns: fix counting records of existing rrset
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
This commit is contained in:
parent
2ca78c7556
commit
74dcbe9c08
|
@ -138,7 +138,7 @@ sub del_a_record {
|
||||||
my $final_records = [ grep { $_->{content} ne $ip } $existing_rrset->{records}->@* ];
|
my $final_records = [ grep { $_->{content} ne $ip } $existing_rrset->{records}->@* ];
|
||||||
my $final_records_size = scalar($final_records->@*);
|
my $final_records_size = scalar($final_records->@*);
|
||||||
# early return if we didn't find our record (i.e., un/filtered record sets have the same size)
|
# early return if we didn't find our record (i.e., un/filtered record sets have the same size)
|
||||||
return if scalar($existing_rrset->{content}->@*) == $final_records_size;
|
return if scalar($existing_rrset->{records}->@*) == $final_records_size;
|
||||||
|
|
||||||
my $rrset = {
|
my $rrset = {
|
||||||
name => $fqdn,
|
name => $fqdn,
|
||||||
|
|
Loading…
Reference in a new issue