From: Lennart Poettering Date: Fri, 8 Jan 2016 15:17:43 +0000 (+0100) Subject: resolved: log about reasons for switching to TCP X-Git-Tag: v231~792^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29ab055292924329ab0512ddb83846a53dd8e0ab;p=platform%2Fupstream%2Fsystemd.git resolved: log about reasons for switching to TCP --- diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index 2af9db5..998ffb6 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -706,8 +706,10 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) { /* On DNS, couldn't send? Try immediately again, with a new server */ dns_transaction_retry(t); + return; } + log_debug("Reply truncated, retrying via TCP."); return; } @@ -1265,6 +1267,8 @@ int dns_transaction_go(DnsTransaction *t) { /* Try via UDP, and if that fails due to large size or lack of * support try via TCP */ r = dns_transaction_emit_udp(t); + if (r == -EMSGSIZE) + log_debug("Sending query via TCP since it is too large."); if (r == -EMSGSIZE || r == -EAGAIN) r = dns_transaction_open_tcp(t); }