Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Nov 4, 2025

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.


For Review

Note that in the comparison referenced above, it was a pointer comparison rather than a string comparison. Thus it would always fail since the two always pointed to two different string literals. This change makes the pointer comparison work as expected.

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.
@bneradt bneradt added this to the 10.2.0 milestone Nov 4, 2025
@bneradt bneradt self-assigned this Nov 4, 2025
Copy link
Contributor

@masaori335 masaori335 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@bneradt bneradt merged commit 24551fe into apache:master Nov 4, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this to For v10.1.1 in ATS v10.1.x Nov 4, 2025
@bneradt bneradt deleted the dns_error_update branch November 4, 2025 22:55
bneradt added a commit to bneradt/trafficserver that referenced this pull request Nov 10, 2025
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.
@bneradt bneradt removed this from ATS v10.1.x Nov 10, 2025
@bneradt
Copy link
Contributor Author

bneradt commented Nov 10, 2025

For 10.1.x:
#12656

@cmcfarlen cmcfarlen removed this from the 10.2.0 milestone Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants