]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Add changelog note for #1087, remove copyright line as discussed, and
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 2 Jul 2026 13:04:51 +0000 (15:04 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 2 Jul 2026 13:04:51 +0000 (15:04 +0200)
compile fixes for newer local_zones_lookup, unused variable warnings
fixed, and also manual page description of the feature.
- Merge #1087: Overload `local_data_remove` to support removing
  specific records.

daemon/remote.c
doc/Changelog
doc/unbound-control.rst

index ccb6016bf5bb508d9a248ca9d0a467ce295e1a57..c89ca94be84cc07fd0c247a99d10c06cfc2c7fd9 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * daemon/remote.c - remote control for the unbound daemon.
  *
- * Copyright (c) 2024, Rubicon Communications, LLC ("Netgate"). All rights reserved.
  * Copyright (c) 2008, NLnet Labs. All rights reserved.
  *
  * This software is open source.
@@ -1539,12 +1538,13 @@ perform_data_remove_rr(RES* ssl, struct local_zones* local_zones,
        uint8_t* rr, size_t len, size_t dname_len, char *arg)
 {
        uint16_t rr_class, rr_type;
-       int labs, s;
+       int labs;
        struct local_zone* z;
        struct local_data* ld;
        uint8_t *rdata;
        size_t rdata_len, index;
        struct packed_rrset_data* d;
+       struct local_rrset* p;
 
        rdata = sldns_wirerr_get_rdatawl(rr, len, dname_len);
        rdata_len = ((size_t)sldns_wirerr_get_rdatalen(rr, len, dname_len))+2;
@@ -1555,7 +1555,7 @@ perform_data_remove_rr(RES* ssl, struct local_zones* local_zones,
        rr_type = sldns_wirerr_get_type(rr, len, dname_len);
 
        z = local_zones_lookup(local_zones, rr, dname_len,
-                       labs, rr_class, rr_type);
+                       labs, rr_class, rr_type, 1);
        if (!z) {
                ssl_printf(ssl, "error no zone for rr %s\n", arg);
                return 0;
@@ -1567,16 +1567,15 @@ perform_data_remove_rr(RES* ssl, struct local_zones* local_zones,
                return 0;
        }
 
-       struct local_rrset* prev=NULL, *p=ld->rrsets;
+       p = ld->rrsets;
        while (p && ntohs(p->rrset->rk.type) != rr_type) {
-               prev = p;
                p = p->next;
        }
 
        if (!p) {
                ssl_printf(ssl, "error no rrset for rr %s\n", arg);
                return 0;
-    }
+       }
 
        d = (struct packed_rrset_data*)p->rrset->entry.data;
        if (!packed_rrset_find_rr(d, rdata, rdata_len, &index)) {
index 2dc431ef066c2d265dfe2fa0a22d2da3346afc44..348c4e01c7b64bdc498c2b37cafeca95da78b243 100644 (file)
@@ -1,3 +1,7 @@
+2 July 2026: Wouter
+       - Merge #1087: Overload `local_data_remove` to support removing
+         specific records.
+
 30 June 2026: Wouter
        - Fix #1469: dohclient: DoH POST missing content-length → :status
          400 from strict resolvers (Cloudflare, Mullvad).
index d95d6dd0b97515d88bf3581c6d450149d95f09e7..9253e53ccc2de9dda37a36910cf106538f453792 100644 (file)
@@ -347,6 +347,8 @@ There are several commands that the server understands.
     Often results in NXDOMAIN for the name (in a static zone), but if the name
     has become an empty nonterminal (there is still data in domain names below
     the removed name), NOERROR nodata answers are the result for that name.
+    With a specific RR instead of a domain name, that specific record is
+    removed from the local data, and not all the RR data.
 
 
 @@UAHL@unbound-control.commands@local_zones@@