From: Vladimír Čunát Date: Tue, 23 May 2017 19:30:54 +0000 (+0200) Subject: Revert "iterator: don't retry if REFUSED" X-Git-Tag: v1.3.0~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dea874302ba5ad3c46ea15a4a07eb670cf676a99;p=thirdparty%2Fknot-resolver.git Revert "iterator: don't retry if REFUSED" 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. --- diff --git a/NEWS b/NEWS index faa9a05ac..4a146652b 100644 --- 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) diff --git a/lib/layer/iterate.c b/lib/layer/iterate.c index d0e67eb3f..e955aa77d 100644 --- a/lib/layer/iterate.c +++ b/lib/layer/iterate.c @@ -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 : "??");