]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add a missing space for DNS over TCP (GH #688)
authorDenis Ovsienko <[email protected]>
Fri, 6 Jul 2018 13:46:13 +0000 (13:46 +0000)
committerDenis Ovsienko <[email protected]>
Fri, 6 Jul 2018 13:53:05 +0000 (13:53 +0000)
(backported from commit 993bc09 in master)

[skip ci]

print-tcp.c

index e0d0531b36b26eed49ff08449cc6c880cb0524e0..316303769d641466495de9d18680c54207ff50ae 100644 (file)
@@ -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