]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
Add more nd_print_trunc() calls
[tcpdump] / print-tcp.c
index d1c2c98403b6c41bb77ba97843fe547354d85c28..a7b60b8ee8057ce3feb6e82db95044e6cd98579b 100644 (file)
@@ -188,7 +188,7 @@ tcp_print(netdissect_options *ndo,
                                      ip6addr_string(ndo, ip6->ip6_dst));
                } else {
                        ND_PRINT("%s > %s:",
-                                    ipaddr_string(ndo, ip->ip_src),
+                                    ipaddr_string(ndo, ip->ip_src),
                                     ipaddr_string(ndo, ip->ip_dst));
                 }
                 nd_print_trunc(ndo);
@@ -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