diff --git a/bin/named/query.c b/bin/named/query.c index 2f891dd07e..ad6873dfb7 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -3905,7 +3905,7 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname, ns_client_killoldestquery(client); } if (result == ISC_R_SUCCESS && !client->mortal && - (client->attributes & NS_CLIENTATTR_TCP) == 0) { + !TCP(client)) { result = ns_client_replace(client); if (result != ISC_R_SUCCESS) { ns_client_log(client, NS_LOGCATEGORY_CLIENT, @@ -3941,7 +3941,7 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname, if (client->query.timerset == ISC_FALSE) ns_client_settimeout(client, 60); - if ((client->attributes & NS_CLIENTATTR_TCP) == 0) + if (!TCP(client)) peeraddr = &client->peeraddr; else peeraddr = NULL; @@ -6106,10 +6106,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) resp_result = ISC_R_SUCCESS; } rrl_result = dns_rrl(client->view, &client->peeraddr, - ISC_TF((client->attributes - & NS_CLIENTATTR_TCP) != 0), - client->message->rdclass, qtype, tname, - resp_result, client->now, + TCP(client), client->message->rdclass, + qtype, tname, resp_result, client->now, wouldlog, log_buf, sizeof(log_buf)); if (rrl_result != DNS_RRL_RESULT_OK) { /* @@ -7801,8 +7799,7 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) { classname, typename, WANTRECURSION(client) ? "+" : "-", (client->signer != NULL) ? "S": "", (client->opt != NULL) ? "E" : "", - ((client->attributes & NS_CLIENTATTR_TCP) != 0) ? - "T" : "", + TCP(client) ? "T" : "", ((extflags & DNS_MESSAGEEXTFLAG_DO) != 0) ? "D" : "", ((flags & DNS_MESSAGEFLAG_CD) != 0) ? "C" : "", onbuf); @@ -8000,8 +7997,7 @@ ns_query_start(ns_client_t *client) { /* * Turn on minimal responses for EDNS/UDP bufsize 512 queries. */ - if (client->opt != NULL && client->udpsize <= 512U && - (client->attributes & NS_CLIENTATTR_TCP) == 0) + if (client->opt != NULL && client->udpsize <= 512U && !TCP(client)) client->query.attributes |= (NS_QUERYATTR_NOAUTHORITY | NS_QUERYATTR_NOADDITIONAL);