Commit bc2a2670 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

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.
parent cbfb170c
Pipeline #3015 passed with stages
in 3 minutes and 7 seconds
......@@ -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 : "??");
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment