]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: improve debug logging on incoming messages a bit
authorLennart Poettering <lennart@poettering.net>
Mon, 16 Nov 2020 20:04:11 +0000 (21:04 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 18 Feb 2021 19:34:18 +0000 (20:34 +0100)
src/resolve/resolved-dns-transaction.c
src/resolve/resolved-manager.c

index 260ce76b98c7080258db5f398f450024aa25924a..e33701235139aff8afde14eedfd35b0e06b8d150 100644 (file)
@@ -1046,7 +1046,8 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p, bool encrypt
          * should hence not attempt to access the query or transaction
          * after calling this function. */
 
-        log_debug("Processing incoming packet on transaction %" PRIu16" (rcode=%s).",
+        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)));
 
         switch (t->scope->protocol) {
@@ -1211,7 +1212,8 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p, bool encrypt
                          * servers often do not implement TCP, hence falling back to TCP on fragmentation is
                          * counter-productive there.) */
 
-                        log_debug("Reply fragmented, retrying via TCP.");
+                        log_debug("Reply fragmented, retrying via TCP. (Largest fragment size: %zu; Datagram size: %zu)",
+                                  p->fragsize, p->size);
                         retry_with_tcp = true;
                 }
         }
index fc5f8c79d39db9fb1202f6d2f11ddb6c74c821f3..2ed9f2d47b5d2c537790a52e8ba67cf0bb42427b 100644 (file)
@@ -926,8 +926,10 @@ int manager_recv(Manager *m, int fd, DnsProtocol protocol, DnsPacket **ret) {
                         p->ifindex = manager_find_ifindex(m, p->family, &p->destination);
         }
 
-        *ret = TAKE_PTR(p);
+        log_debug("Received %s UDP packet of size %zu, ifindex=%i, ttl=%i, fragsize=%zu",
+                  dns_protocol_to_string(protocol), p->size, p->ifindex, p->ttl, p->fragsize);
 
+        *ret = TAKE_PTR(p);
         return 1;
 }