Skip to content

Conversation

@radu-solomon-dnsf
Copy link

The current ARSoft code conisders NXDomain a valid response and does not try the remaining DNS resolvers. This is different than how the winRC currently works with the old library so this change makes the library continue to try all the servers and only return NXDomain if no other response is available

Copilot AI review requested due to automatic review settings June 25, 2025 14:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies the logic around how NXDomain responses are handled by the DNS client so that the resolver continues to query other servers instead of immediately returning NXDomain. Additionally, the project version has been incremented to reflect the changes.

  • Updated conditional check in DnsClientBase.cs to treat NXDomain similarly to ServerFailure.
  • Bumped the project version in the csproj file.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
ARSoft.Tools.Net/Dns/DnsClientBase.cs Updated condition to check for NXDomain as well as ServerFailure.
ARSoft.Tools.Net/ARSoft.Tools.Net.csproj Incremented version from 3.6.1 to 3.6.2.
Comments suppressed due to low confidence (1)

ARSoft.Tools.Net/Dns/DnsClientBase.cs:160

  • Consider adding a comment explaining why NXDomain is handled the same as ServerFailure to improve clarity for future maintainers.
                        if (receivedMessage.Message.ReturnCode is ReturnCode.ServerFailure or ReturnCode.NxDomain)

{
connection.RestartIdleTimeout(receivedMessage.Message.GetEDnsKeepAliveTimeout());

if (receivedMessage.Message.ReturnCode == ReturnCode.ServerFailure)
Copy link
Collaborator

Choose a reason for hiding this comment

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

(question) I might be misunderstanding but if this is in the ARSoft library, it means that anything going over a DnsClient for ARSoft will be subjected to the same logic. If that's the case, would this also mean that this could affect our critical path of DNS resolution beyond local domain resolution only? We've had lots of issues with timeouts on the Zorus side so just making sure I'm not missing something.

Copy link
Author

Choose a reason for hiding this comment

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

Correct. But the expected behavior at least from our clients is that we try all the DNS servers they have configured before deciding NXDomain is the only answer.

@radu-solomon-dnsf radu-solomon-dnsf merged commit 2cb4698 into develop Jun 27, 2025
5 checks passed
@radu-solomon-dnsf radu-solomon-dnsf deleted the fix/local-domains-use-all-servers branch June 27, 2025 14:27
@github-actions
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants