summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-08 16:17:43 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-11 19:40:00 +0100
commit29ab055292924329ab0512ddb83846a53dd8e0ab (patch)
treeeee1b7f7123eeac020af4ec0fce7a86d32b630c2 /src/resolve
parent571370c1555d2aa697733479a50957aff024bbcb (diff)
resolved: log about reasons for switching to TCP
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-transaction.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c
index 2af9db5566..998ffb61c5 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);
}