]> The Tcpdump Group git mirrors - tcpdump/commitdiff
from Rick Jones <[email protected]>:
authorhannes <hannes>
Fri, 21 Jan 2005 08:02:06 +0000 (08:02 +0000)
committerhannes <hannes>
Fri, 21 Jan 2005 08:02:06 +0000 (08:02 +0000)
  suppress the IP printers "bad-len" error message in case
  TSO (TCP segment offload) is enabled

CREDITS
print-ip.c

diff --git a/CREDITS b/CREDITS
index 857edf4bc899e59c855e1d73f14d51627db29212..0370e07364e829bccafb28b49cc832373144e88d 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -106,7 +106,7 @@ Additional people who have contributed patches:
        Phil Wood                       <[email protected]>
        Rafal Maszkowski                <[email protected]>
        Raphael Raimbault               <[email protected]>
-       Rick Jones                      <raj@cup.hp.com>
+       Rick Jones                      <rick.jones2@hp.com>
        Rick Watson                     <[email protected]>
        Rob Braun                       <[email protected]>
        Roderick Schertler              <[email protected]>
index f2d91094f9c2f4ddc78f48d8059a64d229f6ab28..b05088d31da638dd4bfaab8068380c42492f83a0 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.146 2005-01-12 11:19:08 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.147 2005-01-21 08:02:06 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -399,8 +399,19 @@ ip_print(register const u_char *bp, register u_int length)
                (void)printf("truncated-ip - %u bytes missing! ",
                        len - length);
        if (len < hlen) {
-               (void)printf("bad-len %u", len);
-               return;
+#ifdef GUESS_TSO
+            if (len) {
+                (void)printf("bad-len %u", len);
+                return;
+            }
+            else {
+                /* we guess that it is a TSO send */
+                len = length;
+            }
+#else
+            (void)printf("bad-len %u", len);
+            return;
+#endif /* GUESS_TSO */
        }
 
        /*