ubiety / Ubiety.Dns.Core

Flexible DNS library for .NET Core, and .NET Framework
Apache License 2.0
8 stars 6 forks source link

Resolver.Query hangs in simple NAPTR query #8

Closed anders9ustafsson closed 4 years ago

anders9ustafsson commented 4 years ago

Describe the bug Ran the following code:

var builder = ResolverBuilder.Begin();
var resolver = builder.AddDnsServer("8.8.8.8").UseRecursion().SetRetries(3).SetTimeout(1000).EnableCache().Build();
var query = resolver.Query("dev.nwise.se", QuestionType.NAPTR, QuestionClass.IN);

When using online service to lookup NAPTR records, the query provides two answers. With Ubiety.Dns'Core 4.0.0, the query hangs.

Using version 2.4.0 of the library yields a successful query with two answers.

To Reproduce Steps to reproduce the behavior:

  1. Run the above code e.g. in VS Code.
  2. Wait indefinitely for code to complete

Expected behavior Code should complete in a short period, returning a query object with two answers.

Desktop (please complete the following information):

coder2000 commented 4 years ago

It is not just NAPTR records. Time to do some digging.

coder2000 commented 4 years ago

The default TransportType was changed to UDP and no method was provided to change it. Adding a method to change transport but also changing default back to TCP.

coder2000 commented 4 years ago

We are getting a response back from the server, however, the query is being refused according to the response code.

coder2000 commented 4 years ago

It should be resolved in version 4.1.0 when it arrives on NuGet. Still working on the UDP issues.

anders9ustafsson commented 4 years ago

Thanks, I will check in again on 4.1.0.

anders9ustafsson commented 4 years ago

It should be resolved in version 4.1.0 when it arrives on NuGet. Still working on the UDP issues.

@coder2000 Does the problem with UDP still remain, or have you been able to solve this?

coder2000 commented 4 years ago

@anders9ustafsson It is still an issue, I haven't really dug into it yet. If you want to take a crack at it feel free.