]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
Revert "iterator: don't retry if REFUSED"
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 23 May 2017 19:30:54 +0000 (21:30 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 23 May 2017 19:36:52 +0000 (21:36 +0200)
This reverts commit bc2a26702e6460aee65fe170671336d670ba3eb9 (almost).
It would be best to avoid retrying with the same NS and keep trying with
others (if any), but that would require larger changes if it should work
well, so let's err on the side of sending more queries.

NEWS
lib/layer/iterate.c

diff --git a/NEWS b/NEWS
index faa9a05acd862e7399ad7c0b75d56a513d351969..4a146652bde5dc82ae0d4aee7046d330506d3e80 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ Improvements
 - allow answering from cache in non-iterative modes (#122)
 - command line: specify ports via @ but still support # for compatibility
 - policy: recognize 100.64.0.0/10 as local addresses
+- layer/iterate: *do* retry repeatedly if REFUSED, as we can't yet easily
+  retry with other NSs while avoiding retrying with those who REFUSED
 
 
 Knot Resolver 1.2.6 (2017-04-24)
index d0e67eb3f9f63378954f34149e03295401ddaec0..e955aa77dff648c458280d93bee028c7961b1428 100644 (file)
@@ -905,6 +905,7 @@ static int resolve(kr_layer_t *ctx, knot_pkt_t *pkt)
        case KNOT_RCODE_NOERROR:
        case KNOT_RCODE_NXDOMAIN:
                break; /* OK */
+       case KNOT_RCODE_REFUSED:
        case KNOT_RCODE_SERVFAIL: {
                if (query->flags & QUERY_STUB) { break; } /* Pass through in stub mode */
                VERBOSE_MSG("<= rcode: %s\n", rcode ? rcode->name : "??");
@@ -917,7 +918,6 @@ static int resolve(kr_layer_t *ctx, knot_pkt_t *pkt)
                        return KR_STATE_CONSUME;
                }
        }
-       case KNOT_RCODE_REFUSED:
        case KNOT_RCODE_FORMERR:
        case KNOT_RCODE_NOTIMPL:
                VERBOSE_MSG("<= rcode: %s\n", rcode ? rcode->name : "??");