Skip to content

Commit 99ce5c1

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

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
@@ -1204,8 +1204,11 @@ int manager_send(
12041204
assert(port > 0);
12051205
assert(p);
12061206

1207+
/* For mDNS, it is natural that the packet have truncated flag when we have many known answers. */
1208+
bool truncated = DNS_PACKET_TC(p) && (p->protocol != DNS_PROTOCOL_MDNS || !p->more);
1209+
12071210
log_debug("Sending %s%s packet with id %" PRIu16 " on interface %i/%s of size %zu.",
1208-
DNS_PACKET_TC(p) ? "truncated (!) " : "",
1211+
truncated ? "truncated (!) " : "",
12091212
DNS_PACKET_QR(p) ? "response" : "query",
12101213
DNS_PACKET_ID(p),
12111214
ifindex, af_to_name(family),

0 commit comments

Comments
 (0)