1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

resolved: slightly extend debug log output about outgoing messages

This commit is contained in:
Lennart Poettering 2020-11-06 11:46:39 +01:00
parent 088648d081
commit 76f772298e

View File

@ -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);