Skip to content

Commit f704111

Browse files
yuwatabluca
authored andcommitted
resolve: tweak logs about truncation
(cherry picked from commit 614af79) (cherry picked from commit 99ce5c1) (cherry picked from commit dfdbb29)
1 parent c5538d9 commit f704111

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/resolve/resolved-manager.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,8 +1163,11 @@ int manager_send(
11631163
assert(port > 0);
11641164
assert(p);
11651165

1166+
/* For mDNS, it is natural that the packet have truncated flag when we have many known answers. */
1167+
bool truncated = DNS_PACKET_TC(p) && (p->protocol != DNS_PROTOCOL_MDNS || !p->more);
1168+
11661169
log_debug("Sending %s%s packet with id %" PRIu16 " on interface %i/%s of size %zu.",
1167-
DNS_PACKET_TC(p) ? "truncated (!) " : "",
1170+
truncated ? "truncated (!) " : "",
11681171
DNS_PACKET_QR(p) ? "response" : "query",
11691172
DNS_PACKET_ID(p),
11701173
ifindex, af_to_name(family),

0 commit comments

Comments
 (0)