Follow me on twitter

Ticket #424 (closed defect: fixed)

Opened 22 months ago

Last modified 10 months ago

DNS fails due to multiple questions A/AAAA

Reported by: Mafaioz Owned by: bryan
Priority: major Milestone: 1.3
Component: dns Version: 1.2.15
Keywords: Cc: dns, adns, udp

Description (last modified by bryan) (diff)

The bot can't dns properly on my server without setting .resolv.conf.

Change History

Changed 22 months ago by bryan

  • cc dns, adns, udp added
  • priority changed from normal to major
  • component changed from core to dns
  • milestone set to 1.2.16
[D:1218] egg_dns_lookup(hub3.lordares.net, 20)
[D:1218] allocsock(0) = 3
[D:1218] new_dcc (adns): 1 (dccn/dcc_total: 2/2)
[D:1218] dns_idx: 1
[D:1218] dns_sock: 3
[D:1218] dns_ip: 81.167.36.3
[D:1218] SETTING TIMEOUT to 40
main: entering loop
net: connect! sock 3
[D:1218] SETTING TIMEOUT to 0
18:09:37.724654 IP 84.52.208.87.37573 > 81.167.36.3.53: 256+ A? hub3.lordares.net. (35)
18:09:37.724686 IP 84.52.208.87.37573 > 81.167.36.3.53: 256+ AAAA? hub3.lordares.net. (35)
18:09:37.740711 IP 81.167.36.3.53 > 84.52.208.87.37573: 256 0/1/0 (105)

The bot sends 2 questions, A and AAAA. The AAAA returns blank, the A never returns. The bot expects two answers so it does not invalidate the query, just keeps waiting until timeout.

The solution is either to do the multi-server query as is in trunk, or do separate AAAA and A lookups such as 'host' in bind-tools does:

20:19:06.077419 IP 84.52.208.87.53134 > 81.167.36.3.53: 49895+ A? www.kame.net. (30)
20:19:06.093781 IP 84.52.208.87.50528 > 81.167.36.3.53: 774+ AAAA? www.kame.net. (30)

This would also mean that the original query needs to say whether or not it needs ipv6 dns or if ipv4 suffices.

Changed 22 months ago by bryan

  • description modified (diff)

Changed 22 months ago by bryan

Responses vary:

[D:21775] Reply (1) questions: 1 answers: 0 ar: 0 ns: 1 flags: 33152 from: 81.167.36.3
[D:21288] Reply (1) questions: 1 answers: 1 ar: 4 ns: 4 flags: 33152 from: 81.167.36.3
[D:21288] Reply (1): A 66.254.101.1

Changed 22 months ago by bryan

Tcpdump for working above

21:32:59.544534 IP 84.52.208.87.58394 > 81.167.36.3.53: 256+ A? hub3.lordares.net. (35)
21:32:59.544624 IP 84.52.208.87.58394 > 81.167.36.3.53: 256+ AAAA? hub3.lordares.net. (35)
21:32:59.560725 IP 81.167.36.3.53 > 84.52.208.87.58394: 256 1/4/4 A 66.254.101.1 (201)

Changed 10 months ago by bryan

  • milestone set to 1.2.17

Changed 10 months ago by Bryan Drewery

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

Merge branch 'more-dns-fixes'

* more-dns-fixes:

  • Add note about zombie fixes
  • Update doc/UPDATES
  • Use a random query id for dns lookups
  • Add more comments from RFC1035
  • Add note that this fixes #424
  • Remove extra space
  • Lower adns lookup timeout from 30 to 10 seconds
  • When cancelling the query due to timeout of not recieving all answers,
  • Print the dns results in dig format
  • Don't fail a server if it sends no answers

Changeset: 224e3a770b5f00b1369dbd277457fce6ed3c0bdf

Note: See TracTickets for help on using tickets.