Ticket #5718 defect closed duplicate

Opened 12 months ago

Last modified 10 months ago

twisted.names.client.Resolver should not use ANY dns query type to resolve names.

Reported by: kowal Owned by: kowal
Priority: normal Milestone:
Component: names Keywords: dns query
Cc: Branch:
Author: Launchpad Bug:

Description (last modified by glyph) (diff)

I run into this problem when trying to resolve some name. It was giving me different result depending on the dns server with the ANY query type. (the result of both calls can be found in the attachment).

I asked on #dns channel which query type should be used, and this is the explanation I got:

19:24 <hawk> kowal: ANY is a strange beast to begin with, I'm not
             sure what to expect actually
19:28 <hawk> kowal: ANY is not really reliable for any real usage
             when querying a caching server
19:30 <hawk> kowal: The general problem with ANY is that a caching
             server is allowed to just return whatever it has in
             the cache. Ie, if you send a query for ANY and there
             are for instance both A and AAAA records for that
             name, it's allowed to just give you whatever it
             already has... so maybe just the A, or just the AAAA
             or both... you don't really know what you'll get.

Therefore I suggest we use lookupAddress instead of lookupAllNames in the implementation of getHostByName (diff attached).

Attachments

ZHnEeVA4.txt Download (2.1 KB) - added by kowal 12 months ago.
The output of dig commands showing what response can give the query of ANY type
twisted.names.common.py.diff Download (115 bytes) - added by kowal 12 months ago.
Diff to fix the issue

Change History

Changed 12 months ago by kowal

The output of dig commands showing what response can give the query of ANY type

Changed 12 months ago by kowal

Diff to fix the issue

1

Changed 12 months ago by glyph

  • description modified (diff)

2

Changed 12 months ago by exarkun

  • owner set to kowal

Thanks. Please see ReviewProcess for some guidelines for the Twisted development process. Two things I'll highlight are that the change needs unit tests and you should mark the ticket with the "review" keyword when you want someone to consider the patch for inclusion. Thanks again.

3

Changed 10 months ago by rwall

  • status changed from new to closed
  • resolution set to duplicate

Duplicate of #3019.

Note: See TracTickets for help on using tickets.