From: Štěpán Balážik Date: Thu, 18 Feb 2021 13:28:40 +0000 (+0100) Subject: fixup! wip: only switch to tcp on TC=1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fremove_tcp_timeout_threshold;p=thirdparty%2Fknot-resolver.git fixup! wip: only switch to tcp on TC=1 --- diff --git a/lib/selection_iter.c b/lib/selection_iter.c index 61e1080df..ed09ddb3d 100644 --- a/lib/selection_iter.c +++ b/lib/selection_iter.c @@ -99,7 +99,7 @@ static void unpack_state_from_zonecut(struct iter_local_state *local_state, name_state->a_state = RECORD_UNKNOWN; name_state->aaaa_state = RECORD_UNKNOWN; } - + /* Iterate over all addresses of this NS (if any). */ for (uint8_t *obj = pack_head(*addresses); obj != pack_tail(*addresses); obj = pack_obj_next(obj)) { @@ -254,7 +254,7 @@ void iter_choose_transport(struct kr_query *qry, struct kr_transport **transport qry->server_selection.local_state->force_resolve = false; } - bool tcp = qry->flags.TCP || qry->server_selection.local_state->truncated; + bool tcp = qry->server_selection.local_state->truncated; *transport = select_transport(choices, choices_len, resolvable, resolvable_len, qry->server_selection.local_state->timeouts, mempool, tcp, NULL);