This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new c699916651 Fix DNS error logging to use ERR_DNS_FAIL (#12638) (#12656)
c699916651 is described below

commit c6999166519e314bae4935086a8ad83ac2dcf3a8
Author: Brian Neradt <[email protected]>
AuthorDate: Thu Dec 4 22:53:01 2025 -0600

    Fix DNS error logging to use ERR_DNS_FAIL (#12638) (#12656)
    
    Fixed a pointer comparison bug where the error_body_type string literal
    was compared by pointer address instead of value. This now passes the
    Dns_error_body constant directly so the pointer comparison succeeds and
    DNS errors are correctly logged as ERR_DNS_FAIL.
---
 src/proxy/http/HttpTransact.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/proxy/http/HttpTransact.cc b/src/proxy/http/HttpTransact.cc
index 42ca42c943..b5c16cd5a1 100644
--- a/src/proxy/http/HttpTransact.cc
+++ b/src/proxy/http/HttpTransact.cc
@@ -1927,7 +1927,7 @@ HttpTransact::OSDNSLookup(State *s)
       SET_VIA_STRING(VIA_DETAIL_TUNNEL, VIA_DETAIL_TUNNEL_NO_FORWARD);
       if (!s->dns_info.record || s->dns_info.record->is_failed()) {
         // Set to internal server error so later logging will pick up 
SQUID_LOG_ERR_DNS_FAIL
-        build_error_response(s, HTTP_STATUS_INTERNAL_SERVER_ERROR, "Cannot 
find server.", "connect#dns_failed");
+        build_error_response(s, HTTP_STATUS_INTERNAL_SERVER_ERROR, "Cannot 
find server.", Dns_error_body);
         log_msg = "looking up";
       } else {
         build_error_response(s, HTTP_STATUS_INTERNAL_SERVER_ERROR, "No valid 
server.", "connect#all_down");

Reply via email to