Skip to content

Commit c862396

Browse files
author
hannes
committed
from Rick Jones <[email protected]>:
suppress the IP printers "bad-len" error message in case TSO (TCP segment offload) is enabled
1 parent 0af21e6 commit c862396

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

CREDITS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Additional people who have contributed patches:
106106
Phil Wood <[email protected]>
107107
Rafal Maszkowski <[email protected]>
108108
Raphael Raimbault <[email protected]>
109-
Rick Jones <raj@cup.hp.com>
109+
Rick Jones <rick.jones2@hp.com>
110110
Rick Watson <[email protected]>
111111
Rob Braun <[email protected]>
112112
Roderick Schertler <[email protected]>

print-ip.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#ifndef lint
2323
static const char rcsid[] _U_ =
24-
"@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.146 2005-01-12 11:19:08 hannes Exp $ (LBL)";
24+
"@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.147 2005-01-21 08:02:06 hannes Exp $ (LBL)";
2525
#endif
2626

2727
#ifdef HAVE_CONFIG_H
@@ -399,8 +399,19 @@ ip_print(register const u_char *bp, register u_int length)
399399
(void)printf("truncated-ip - %u bytes missing! ",
400400
len - length);
401401
if (len < hlen) {
402-
(void)printf("bad-len %u", len);
403-
return;
402+
#ifdef GUESS_TSO
403+
if (len) {
404+
(void)printf("bad-len %u", len);
405+
return;
406+
}
407+
else {
408+
/* we guess that it is a TSO send */
409+
len = length;
410+
}
411+
#else
412+
(void)printf("bad-len %u", len);
413+
return;
414+
#endif /* GUESS_TSO */
404415
}
405416

406417
/*

0 commit comments

Comments
 (0)