X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/675033addfeaa8e56f051560bf7defa8a5b709ee..4c683712d4b483b43f16d41d09ec6232cbc917ca:/print-tcp.c?ds=sidebyside diff --git a/print-tcp.c b/print-tcp.c index 862d0216..aa756021 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -425,9 +425,11 @@ tcp_print(netdissect_options *ndo, } } - if (flags & TH_ACK) { + if (flags & TH_ACK) ND_PRINT(", ack %u", ack); - } + else + if (ndo->ndo_vflag > 1 && ack != 0) + ND_PRINT(", [ack %u != 0 while ACK flag not set]", ack); ND_PRINT(", win %u", win); @@ -718,8 +720,11 @@ tcp_print(netdissect_options *ndo, nd_trunc_longjmp(ndo); } bp += header_len; - if ((flags & TH_RST) && ndo->ndo_vflag) { - print_tcp_rst_data(ndo, bp, length); + if (flags & TH_RST) { + if(ndo->ndo_vflag) + print_tcp_rst_data(ndo, bp, length); + else + ND_TCHECK_LEN(bp, length); return; }