Commit graph

20 commits

Author SHA1 Message Date
Pieter Wuille
a59329d936
Merge pull request #19
bb53306 dns: listen on ipv6 (Pavel Vasin)
34fd288 remove option to build without ipv6 support (Pavel Vasin)
2015-07-29 15:55:49 +02:00
Peter Todd
5eca8e269a
Fix negative responses
Previously if the resolver was asked for a record it didn't have, it would
return a response with a NS record in the authority section.  This is
incorrect, as the lack of answer indicates to the resolver that it should try
that NS record as the next step, resulting in a loop:

    $ dig @8.8.8.8 rbf-seed.btc.petertodd.org TXT +trace

    <snip>

    rbf-seed.btc.petertodd.org. 300 IN      NS      rbf-seed-ns1.btc.petertodd.org.
    rbf-seed.btc.petertodd.org. 300 IN      NS      rbf-seed-ns2.btc.petertodd.org.
    ;; Received 141 bytes from 205.251.193.174#53(ns-430.awsdns-53.com) in 426 ms

    rbf-seed.btc.petertodd.org. 40000 IN    NS      rbf-seed-ns2.btc.petertodd.org.
    ;; BAD (HORIZONTAL) REFERRAL
    ;; Received 88 bytes from 185.52.1.173#53(rbf-seed-ns2.btc.petertodd.org) in 108 ms

    rbf-seed.btc.petertodd.org. 40000 IN    NS      rbf-seed-ns2.btc.petertodd.org.
    ;; BAD (HORIZONTAL) REFERRAL
    ;; Received 88 bytes from 185.52.1.173#53(rbf-seed-ns2.btc.petertodd.org) in 108 ms

    <snip>

    rbf-seed.btc.petertodd.org. 40000 IN    NS      rbf-seed-ns2.btc.petertodd.org.
    ;; BAD (HORIZONTAL) REFERRAL
    dig: too many lookups

The correct response in the authority section of a negative response is a SOA
record, which indicates that the answer is authoritative and the resolver can
consider the record missing and stop looking for it:

    $ dig @8.8.8.8 rbf-seed.btc.petertodd.org TXT +trace

    <snip>

    rbf-seed.btc.petertodd.org. 300 IN      NS      rbf-seed-ns1.btc.petertodd.org.
    rbf-seed.btc.petertodd.org. 300 IN      NS      rbf-seed-ns2.btc.petertodd.org.
    ;; Received 141 bytes from 205.251.196.185#53(ns-1209.awsdns-23.org) in 740 ms

    rbf-seed.btc.petertodd.org. 40000 IN    SOA     rbf-seed-ns1.btc.petertodd.org. pete.petertodd.org. 1435846201 604800 86400 2592000 604800
    ;; Received 128 bytes from 104.236.95.174#53(rbf-seed-ns1.btc.petertodd.org) in 31 ms

There have been a few reports of problems resolving seed domains on some
ISPs - hopefully this was the root cause.
2015-07-02 09:58:14 -04:00
Pieter Wuille
11e935b720 Avoid circular references 2015-03-07 04:03:08 -08:00
Pavel Vasin
bb53306a2e dns: listen on ipv6 2014-07-21 15:59:25 +04:00
Pieter Wuille
8dcc006e62 Bugfix: case-insensitive hostname matching 2013-07-15 12:20:36 +02:00
Pieter Wuille
7552cbcc47 Ignore nonzero Z in requests 2013-04-28 03:22:22 +02:00
Pieter Wuille
a8d711b832 Use correct reply size in DNS packets 2013-04-18 09:36:41 +02:00
Luke Dashjr
4947772477 Bugfix: Send DNS replies from the same IP the request was sent to 2012-06-03 17:10:46 +00:00
Pieter Wuille
ff1515d9fe fix AAAA record replies 2012-05-25 15:59:10 +02:00
Pieter Wuille
309d8ee0ae IPv6/AAAA record support 2012-05-25 15:41:27 +02:00
Pieter Wuille
54fb24d7c3 Multiple DNS threads 2012-05-04 01:15:49 +02:00
Pieter Wuille
c00ca462ce getopt 2012-01-01 19:18:56 +01:00
Pieter Wuille
f7ce03cf70 nicer output 2011-12-26 15:53:22 +01:00
Pieter Wuille
3cb418361b tweaks and cleanups 2011-12-26 01:04:24 +01:00
Pieter Wuille
d14cd8adb6 result permutation 2011-12-20 22:18:13 +01:00
Pieter Wuille
c5fc5b4efb nicer output, dns modular 2011-12-20 14:29:21 +01:00
Pieter Wuille
c4cc50a155 working 2011-12-20 05:20:50 +01:00
Pieter Wuille
aeec0156a2 netbase and protocol from satoshi bitcoin 2011-12-16 16:56:36 +01:00
Pieter Wuille
e93ffbf4df working DNS 2011-12-13 19:35:10 +01:00
Pieter Wuille
7721f9c1a3 initial commit 2011-12-13 16:02:51 +01:00