Skip to content

Commit dfdbb29

Browse files
yuwatakeszybz
authored andcommitted
resolve: tweak logs about truncation
(cherry picked from commit 614af79) (cherry picked from commit 99ce5c1)
1 parent 29198f7 commit dfdbb29

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
@@ -1175,8 +1175,11 @@ int manager_send(
11751175
assert(port > 0);
11761176
assert(p);
11771177

1178+
/* For mDNS, it is natural that the packet have truncated flag when we have many known answers. */
1179+
bool truncated = DNS_PACKET_TC(p) && (p->protocol != DNS_PROTOCOL_MDNS || !p->more);
1180+
11781181
log_debug("Sending %s%s packet with id %" PRIu16 " on interface %i/%s of size %zu.",
1179-
DNS_PACKET_TC(p) ? "truncated (!) " : "",
1182+
truncated ? "truncated (!) " : "",
11801183
DNS_PACKET_QR(p) ? "response" : "query",
11811184
DNS_PACKET_ID(p),
11821185
ifindex, af_to_name(family),

0 commit comments

Comments
 (0)