Commit 7fb71d65c0 for bind

commit 7fb71d65c006e79232d0a76b3642e743baa5e4bd
Author: Martin Basti <mbasti@isc.org>
Date:   Fri Nov 20 19:16:17 2026 +0000

    Log the client address of DNS error reports

    The dns-reporting-agent log line only contained the reported name.
    To find out which resolver sent a report, one had to enable query
    logging and match the two lines. Add the client address to the line,
    as the trust-anchor-telemetry line already does.

    Assisted-by: Claude:claude-fable-5-2

diff --git a/bin/tests/system/auth/tests.sh b/bin/tests/system/auth/tests.sh
index 1af44f4557..c5f5b005db 100644
--- a/bin/tests/system/auth/tests.sh
+++ b/bin/tests/system/auth/tests.sh
@@ -213,9 +213,10 @@ n=$((n + 1))
 echo_i "check that error report queries are logged and no Report-Channel option is present in the response ($n)"
 ret=0
 nextpart ns1/named.run >/dev/null
-$DIG $DIGOPTS @10.53.0.1 _er.0.example.1._er.example.rad TXT >dig.out.test$n
-nextpart ns1/named.run | grep "dns-reporting-agent '_er.0.example.1._er.example.rad/IN'" >/dev/null || ret=1
-grep "; Report-Channel: \"example.rad\"" dig.out.test$n >/dev/null && ret=1
+$DIG $DIGOPTS -b 10.53.0.9 @10.53.0.1 _er.0.example.1._er.example.rad TXT >dig.out.test$n
+nextpart ns1/named.run | grep -F "dns-reporting-agent '_er.0.example.1._er.example.rad/IN' from 10.53.0.9" >/dev/null || ret=1
+grep -F "\"Report received\"" dig.out.test$n >/dev/null || ret=1
+grep -F "; Report-Channel: \"example.rad\"" dig.out.test$n >/dev/null && ret=1
 [ $ret -eq 0 ] || echo_i "failed"
 status=$((status + ret))

@@ -224,8 +225,9 @@ echo_i "check that error report queries to non-logging zones are not logged ($n)
 ret=0
 nextpart ns1/named.run >/dev/null
 $DIG $DIGOPTS @10.53.0.1 _er.0.example.1._er.example.com TXT >dig.out.test$n
-nextpart ns1/named.run | grep "dns-reporting-agent '_er.0.example.1._er.example.com/IN'" >/dev/null && ret=1
-grep "; Report-Channel: \"rad.example.net\"" dig.out.test$n >/dev/null || ret=1
+nextpart ns1/named.run | grep -F "dns-reporting-agent '_er.0.example.1._er.example.com/IN'" >/dev/null && ret=1
+grep -F "\"Report received\"" dig.out.test$n >/dev/null && ret=1
+grep -F "; Report-Channel: \"rad.example.net\"" dig.out.test$n >/dev/null || ret=1
 [ $ret -eq 0 ] || echo_i "failed"
 status=$((status + ret))

diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst
index 823e0635a7..103e413ca5 100644
--- a/doc/arm/reference.rst
+++ b/doc/arm/reference.rst
@@ -7568,7 +7568,8 @@ Zone Options
    matching the prescribed RFC 9567 error-reporting format
    (``_er.<type>.<name>.<extended-rcode>._er.<zone-name>``)
    are logged to the ``dns-reporting-agent`` logging category at
-   level ``info``.
+   level ``info``, together with the address of the client that sent
+   the report.

    The zone must have a wildcard record in place to respond to such
    queries; it is a configuration error to use this option in a
diff --git a/lib/ns/query.c b/lib/ns/query.c
index 00ce222aea..49c0ba98bc 100644
--- a/lib/ns/query.c
+++ b/lib/ns/query.c
@@ -5110,14 +5110,19 @@ qctx_reportquery(query_ctx_t *qctx) {
 	if (isc_log_wouldlog(ISC_LOG_INFO)) {
 		char classbuf[DNS_RDATACLASS_FORMATSIZE];
 		char namebuf[DNS_NAME_FORMATSIZE];
+		char clientbuf[ISC_NETADDR_FORMATSIZE];
+		isc_netaddr_t netaddr;

 		dns_name_format(client->query.qname, namebuf, sizeof(namebuf));
 		dns_rdataclass_format(client->inner.view->rdclass, classbuf,
 				      sizeof(classbuf));
+		isc_netaddr_fromsockaddr(&netaddr, &client->inner.peeraddr);
+		isc_netaddr_format(&netaddr, clientbuf, sizeof(clientbuf));

 		isc_log_write(NS_LOGCATEGORY_DRA, NS_LOGMODULE_QUERY,
-			      ISC_LOG_INFO, "dns-reporting-agent '%s/%s'",
-			      namebuf, classbuf);
+			      ISC_LOG_INFO,
+			      "dns-reporting-agent '%s/%s' from %s", namebuf,
+			      classbuf, clientbuf);
 	}
 }