From: Lennart Poettering Date: Fri, 6 Nov 2020 10:46:39 +0000 (+0100) Subject: resolved: slightly extend debug log output about outgoing messages X-Git-Tag: v247-rc2~21^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76f772298e3473f00eff7cb6dc294926a7d8cc4f;p=thirdparty%2Fsystemd.git resolved: slightly extend debug log output about outgoing messages --- diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index bb333e22ebb..e00359f6a51 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -919,7 +919,11 @@ static int write_loop(int fd, void *message, size_t length) { int manager_write(Manager *m, int fd, DnsPacket *p) { int r; - log_debug("Sending %s packet with id %" PRIu16 ".", DNS_PACKET_QR(p) ? "response" : "query", DNS_PACKET_ID(p)); + log_debug("Sending %s%s packet with id %" PRIu16 " of size %zu.", + DNS_PACKET_TC(p) ? "truncated (!) " : "", + DNS_PACKET_QR(p) ? "response" : "query", + DNS_PACKET_ID(p), + p->size); r = write_loop(fd, DNS_PACKET_DATA(p), p->size); if (r < 0) @@ -1055,7 +1059,12 @@ int manager_send( assert(port > 0); assert(p); - log_debug("Sending %s packet with id %" PRIu16 " on interface %i/%s.", DNS_PACKET_QR(p) ? "response" : "query", DNS_PACKET_ID(p), ifindex, af_to_name(family)); + log_debug("Sending %s%s packet with id %" PRIu16 " on interface %i/%s of size %zu.", + DNS_PACKET_TC(p) ? "truncated (!) " : "", + DNS_PACKET_QR(p) ? "response" : "query", + DNS_PACKET_ID(p), + ifindex, af_to_name(family), + p->size); if (family == AF_INET) return manager_ipv4_send(m, fd, ifindex, &destination->in, port, source ? &source->in : NULL, p);