Skip to content
Snippets Groups Projects
Verified Commit eeef49d8 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

lib/selection*: more precise flags.TCP

I'm overall unsure here, but this does seem as improvement.
parent a07a58f7
Branches
Tags
1 merge request!1155STUB + TCP
......@@ -17,7 +17,7 @@ struct kr_qflags {
bool NO_MINIMIZE : 1; /**< Don't minimize QNAME. */
bool NO_IPV6 : 1; /**< Disable IPv6 */
bool NO_IPV4 : 1; /**< Disable IPv4 */
bool TCP : 1; /**< Use TCP for this query. */
bool TCP : 1; /**< Use TCP (or TLS) for this query. */
bool RESOLVED : 1; /**< Query is resolved. Note that kr_query gets
* RESOLVED before following a CNAME chain; see .CNAME. */
bool AWAIT_IPV4 : 1; /**< Query is waiting for A address. */
......
......@@ -91,7 +91,8 @@ void forward_choose_transport(struct kr_query *qry,
(*transport)->protocol = KR_TRANSPORT_UDP;
/* We need to propagate this to flags since it's used in other
* parts of the resolver (e.g. logging and stats). */
qry->flags.TCP = tcp;
qry->flags.TCP = (*transport)->protocol == KR_TRANSPORT_TCP
|| (*transport)->protocol == KR_TRANSPORT_TLS;
}
}
......
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