diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-07-09 15:56:50 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-07-09 19:51:23 +0900 |
commit | 0d609349ba7e4df07c548c1cfe5127b431de7554 (patch) | |
tree | 27496ee941c3149259b8eba813de601c8deda3b3 /src/resolve/resolved-dns-transaction.c | |
parent | c9472f9102915758da473726b70e5a09264b43ec (diff) | |
download | systemd-0d609349ba7e4df07c548c1cfe5127b431de7554.tar.gz |
resolve: introduce FORMAT_DNS_RCODE() macro
Fixes #23958.
Diffstat (limited to 'src/resolve/resolved-dns-transaction.c')
-rw-r--r-- | src/resolve/resolved-dns-transaction.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index 6acf251d60..27685a90a9 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -864,7 +864,7 @@ static int dns_transaction_dnssec_ready(DnsTransaction *t) { case DNS_TRANSACTION_RCODE_FAILURE: if (!IN_SET(dt->answer_rcode, DNS_RCODE_NXDOMAIN, DNS_RCODE_SERVFAIL)) { - log_debug("Auxiliary DNSSEC RR query failed with rcode=%s.", dns_rcode_to_string(dt->answer_rcode)); + log_debug("Auxiliary DNSSEC RR query failed with rcode=%s.", FORMAT_DNS_RCODE(dt->answer_rcode)); goto fail; } @@ -1049,7 +1049,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p, bool encrypt log_debug("Processing incoming packet of size %zu on transaction %" PRIu16" (rcode=%s).", p->size, - t->id, dns_rcode_to_string(DNS_PACKET_RCODE(p))); + t->id, FORMAT_DNS_RCODE(DNS_PACKET_RCODE(p))); switch (t->scope->protocol) { @@ -1137,7 +1137,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p, bool encrypt return; /* Give up, accept the rcode */ - log_debug("Server returned error: %s", dns_rcode_to_string(DNS_PACKET_RCODE(p))); + log_debug("Server returned error: %s", FORMAT_DNS_RCODE(DNS_PACKET_RCODE(p))); break; } @@ -1151,7 +1151,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p, bool encrypt t->clamp_feature_level_servfail < 0) { t->clamp_feature_level_servfail = t->current_feature_level; log_debug("Server returned error %s, retrying transaction.", - dns_rcode_to_string(DNS_PACKET_RCODE(p))); + FORMAT_DNS_RCODE(DNS_PACKET_RCODE(p))); } else { /* Reduce this feature level by one and try again. */ switch (t->current_feature_level) { @@ -1167,7 +1167,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p, bool encrypt } log_debug("Server returned error %s, retrying transaction with reduced feature level %s.", - dns_rcode_to_string(DNS_PACKET_RCODE(p)), + FORMAT_DNS_RCODE(DNS_PACKET_RCODE(p)), dns_server_feature_level_to_string(t->clamp_feature_level_servfail)); } @@ -1308,7 +1308,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p, bool encrypt t->clamp_feature_level_nxdomain = DNS_SERVER_FEATURE_LEVEL_UDP; log_debug("Server returned error %s in EDNS0 mode, retrying transaction with reduced feature level %s (DVE-2018-0001 mitigation)", - dns_rcode_to_string(DNS_PACKET_RCODE(p)), + FORMAT_DNS_RCODE(DNS_PACKET_RCODE(p)), dns_server_feature_level_to_string(t->clamp_feature_level_nxdomain)); dns_transaction_retry(t, false /* use the same server */); |