Opened 2 years ago

Closed 2 years ago

#5718 defect closed duplicate (duplicate)

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)

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 (2)

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

Download all attachments as: .zip

Change History (5)

Changed 2 years ago by kowal

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

Changed 2 years ago by kowal

Diff to fix the issue

comment:1 Changed 2 years ago by glyph

  • Description modified (diff)

comment:2 Changed 2 years 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.

comment:3 Changed 2 years ago by rwall

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #3019.

Note: See TracTickets for help on using tickets.