]> git.proxmox.com Git - pve-network.git/commitdiff
sdn: powerdns: fix counting records of existing rrset
authorStefan Hanreich <s.hanreich@proxmox.com>
Mon, 4 Mar 2024 17:33:42 +0000 (18:33 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 5 Mar 2024 05:26:23 +0000 (06:26 +0100)
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
src/PVE/Network/SDN/Dns/PowerdnsPlugin.pm

index ab20e8d6a2ca060424289f87aaf13900f6d7b6c9..dae63d122427be7a0519e36bfd27a1eed6ed0650 100644 (file)
@@ -138,7 +138,7 @@ sub del_a_record {
     my $final_records = [ grep { $_->{content} ne $ip } $existing_rrset->{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)
-    return if scalar($existing_rrset->{content}->@*) == $final_records_size;
+    return if scalar($existing_rrset->{records}->@*) == $final_records_size;
 
     my $rrset = {
        name => $fqdn,