X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/f67e46a634dd3bdcefa9fc09dbef6baae1b1d1ed..282508f16b8fde1bb95fabef1afb2d77c24a306b:/print-tcp.c?ds=sidebyside diff --git a/print-tcp.c b/print-tcp.c index b727dde0..aa756021 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -425,14 +425,19 @@ 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); if (flags & TH_URG) ND_PRINT(", urg %u", urp); + else + if (ndo->ndo_vflag > 1 && urp != 0) + ND_PRINT(", [urg %u != 0 while URG flag not set]", urp); /* * Handle any options. */ @@ -715,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; }