From: Denis Ovsienko Date: Fri, 6 Jul 2018 13:46:13 +0000 (+0000) Subject: Add a missing space for DNS over TCP (GH #688) X-Git-Tag: tcpdump-4.9.3~140 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/39521fe058c10998da189fdde0db230a060c8382 Add a missing space for DNS over TCP (GH #688) (backported from commit 993bc09 in master) [skip ci] --- diff --git a/print-tcp.c b/print-tcp.c index e0d0531b..31630376 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -714,6 +714,12 @@ tcp_print(netdissect_options *ndo, rtsp_print(ndo, bp, length); } else if (length > 2 && (IS_SRC_OR_DST_PORT(NAMESERVER_PORT))) { + /* domain_print() assumes it does not have to prepend a space before its + * own output to separate it from the output of the calling function. This + * works well with udp_print(), but requires a small prop here. + */ + ND_PRINT((ndo, " ")); + /* * TCP DNS query has 2byte length at the head. * XXX packet could be unaligned, it can go strange