]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Log error when update fails
authorMatthijs Mekking <matthijs@isc.org>
Mon, 3 Jun 2024 05:56:21 +0000 (07:56 +0200)
committerNicki Křížek <nicki@isc.org>
Mon, 10 Jun 2024 14:55:12 +0000 (16:55 +0200)
The new "too many records" error can make an update fail without the
error being logged. This commit fixes that.

lib/ns/update.c

index dfecd4262f8c92b3d98afabe708c7480d484d168..e5e602983b9338e74fdae051a160a5bd7d850ded 100644 (file)
@@ -3160,9 +3160,18 @@ update_action(void *arg) {
                                                dns_diff_clear(&ctx.add_diff);
                                                goto failure;
                                        }
-                                       CHECK(update_one_rr(db, ver, &diff,
-                                                           DNS_DIFFOP_ADD,
-                                                           name, ttl, &rdata));
+                                       result = update_one_rr(
+                                               db, ver, &diff, DNS_DIFFOP_ADD,
+                                               name, ttl, &rdata);
+                                       if (result != ISC_R_SUCCESS) {
+                                               update_log(client, zone,
+                                                          LOGLEVEL_PROTOCOL,
+                                                          "adding an RR "
+                                                          "failed: %s",
+                                                          isc_result_totext(
+                                                                  result));
+                                               goto failure;
+                                       }
                                }
                        }
                } else if (update_class == dns_rdataclass_any) {