}
bp += header_len;
if (flags & TH_RST) {
- if(ndo->ndo_vflag)
+ if (ndo->ndo_vflag)
print_tcp_rst_data(ndo, bp, length);
else
ND_TCHECK_LEN(bp, length);
print_tcp_rst_data(netdissect_options *ndo,
const u_char *sp, u_int length)
{
- ND_PRINT(ND_TTEST_LEN(sp, length) ? " [RST" : " [!RST");
- if (length > MAX_RST_DATA_LEN) {
- length = MAX_RST_DATA_LEN; /* can use -X for longer */
+ ND_PRINT(" [RST");
+ if (length > MAX_RST_DATA_LEN) /* can use -X for longer */
ND_PRINT("+"); /* indicate we truncate */
- }
ND_PRINT(" ");
- (void)nd_printn(ndo, sp, length, ndo->ndo_snapend);
+ nd_printjn(ndo, sp, ND_MIN(length, MAX_RST_DATA_LEN));
ND_PRINT("]");
+ ND_TCHECK_LEN(sp, length);
}
static void
1 2013-02-26 22:03:19.190965 IP (tos 0x20, ttl 243, id 8243, offset 0, flags [DF], proto TCP (6), length 98)
- 199.204.31.89.80 > 172.16.133.41.52875: Flags [R.], seq 1617159969:1617160027, ack 1936660873, win 5785, length 58 [!RST+ BIG-IP: [0x11c5672:3045] {peer]
+ 199.204.31.89.80 > 172.16.133.41.52875: Flags [R.], seq 1617159969:1617160027, ack 1936660873, win 5785, length 58 [RST+ BIG-IP: [0x11c5672:3045] {peer] [|tcp]