Skip to content

dns: propagate ares_dns_write() failure status - #67044

Open
lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-67043-dns-write-status
Open

lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-67043-dns-write-status

Conversation

@lazerg

@lazerg lazerg commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

QueryWrap::Callback ignored the return value of ares_dns_write(). When c-ares can't serialize the parsed reply again (for example a record whose owner name contains a space), the query still finished with ARES_SUCCESS and an empty buffer, so parsing it later failed with a misleading EFORMERR. Now the status from ares_dns_write() is passed on, so the lookup fails with the real error (EBADNAME in that case).

Fixes: #67043

Assisted-by: Claude Code
Signed-off-by: lazerg <[email protected]>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run. labels Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

@lazerg

lazerg commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

okay and?

@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (640ce85) to head (71a8560).
⚠️ Report is 59 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67044      +/-   ##
==========================================
- Coverage   90.66%   90.65%   -0.02%     
==========================================
  Files         797      797              
  Lines      278268   278268              
  Branches    53521    53511      -10     
==========================================
- Hits       252280   252251      -29     
- Misses      16382    16396      +14     
- Partials     9606     9621      +15     
Files with missing lines Coverage Δ
src/cares_wrap.h 79.24% <100.00%> (ø)

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@addaleax addaleax added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 30, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 30, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentscan:community-flagged c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dns: valid replies fail with EFORMERR when ares_dns_write() fails in QueryWrap::Callback

3 participants