]> 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)
committerOndřej Surý <ondrej@isc.org>
Mon, 29 Jul 2024 10:27:25 +0000 (12:27 +0200)
The new "too many records" error can make an update fail without the
error being logged. This commit fixes that.

(cherry picked from commit 558923e5405894cf976d102f0d246a28bdbb400c)

lib/ns/update.c

index 4e51cdcb7748c10f07ae98ffa2d8bc6267e7ad37..d9cea2c4c6a869e0f2ab98e3d872a07af4a8b935 100644 (file)
@@ -3136,9 +3136,18 @@ update_action(isc_task_t *task, isc_event_t *event) {
                                                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) {