diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2017-04-07 14:05:41 +0200 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2017-04-07 15:13:18 +0200 |
commit | bc2a26702e6460aee65fe170671336d670ba3eb9 (patch) | |
tree | ac86b46ab28ee671194875995ac87fbe6caca32f | |
parent | Merge branch 'strip-dev-from-1.2.5' into '1.2' (diff) | |
download | knot-resolver-bc2a26702e6460aee65fe170671336d670ba3eb9.tar.xz knot-resolver-bc2a26702e6460aee65fe170671336d670ba3eb9.zip |
iterator: don't retry if REFUSED
It's unlikely to be a temporary condition, unless the reply was spoofed
or something. Fixes val_cname_to_unsigned_fake_rrsig test.
-rw-r--r-- | lib/layer/iterate.c | 2 | ||||
-rw-r--r-- | lib/resolve.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/layer/iterate.c b/lib/layer/iterate.c index cc78631d..ada8f1c0 100644 --- a/lib/layer/iterate.c +++ b/lib/layer/iterate.c @@ -860,7 +860,6 @@ 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 : "??"); @@ -873,6 +872,7 @@ 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 : "??"); diff --git a/lib/resolve.c b/lib/resolve.c index 34915be2..edba5252 100644 --- a/lib/resolve.c +++ b/lib/resolve.c @@ -1062,8 +1062,7 @@ int kr_resolve_produce(struct kr_request *request, struct sockaddr **dst, int *t ns_election: - /* If the query has got REFUSED & SERVFAIL, retry with current src up to KR_QUERY_NSRETRY_LIMIT. - * If the query has already selected a NS and is waiting for IPv4/IPv6 record, + /* If the query has already selected a NS and is waiting for IPv4/IPv6 record, * elect best address only, otherwise elect a completely new NS. */ if(++ns_election_iter >= KR_ITER_LIMIT) { |