Skip to content

Commit

Permalink
Relax name failure handling - other resolvers may be successful
Browse files Browse the repository at this point in the history
  • Loading branch information
jdomnitz committed Jul 23, 2024
1 parent 0803857 commit 9d96b85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions TinyDNS/DNSResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public async Task<List<IPAddress>> ResolveHostV6(string hostname)
{
//Prevent leaking local domains into the global DNS space
if (privateQuery && !IsPrivate(nsIP))
return null;
continue;

int bytes;
try
Expand Down Expand Up @@ -262,11 +262,7 @@ public async Task<List<IPAddress>> ResolveHostV6(string hostname)
{
Message response = new Message(buffer.Slice(0, bytes).Span);

//If there is a name error abort and return to the user
if (response.ResponseCode == DNSStatus.NameError)
return response;

//For any other error try a different nameserver
//For any error try a different nameserver
if (response.ResponseCode != DNSStatus.NoError)
continue;

Expand Down
2 changes: 1 addition & 1 deletion TinyDNS/TinyDNS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net80</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.7</Version>
<Version>0.7.1</Version>
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Authors>jdomnitz</Authors>
Expand Down

0 comments on commit 9d96b85

Please sign in to comment.