]> 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:46:13 +0000 (13:46 +0000)
[skip ci]

print-tcp.c

index d1c2c98403b6c41bb77ba97843fe547354d85c28..f69c56de83a160e0ea11381205b7d178811ad009 100644 (file)
@@ -737,6 +737,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(" ");
+
                 /*
                  * TCP DNS query has 2byte length at the head.
                  * XXX packet could be unaligned, it can go strange