enable tcpdump GUESS_TSO flag?

Eggert, Lars lars at netapp.com
Thu Apr 4 11:24:28 UTC 2013


Hi,

I wonder whether it'd be a good idea to enable tcpdump's GUESS_TSO flag by default? It enables a heuristic that lets tcpdump understand pcaps that include segments generated by TCP TSO (which otherwise show up as "IP bad-len 0".)

See the dicussion at http://www.mail-archive.com/tcpdump-workers@lists.tcpdump.org/msg01051.html for details.

Lars

diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile
index ca8ec4c..5fd73a1 100644
--- a/usr.sbin/tcpdump/tcpdump/Makefile
+++ b/usr.sbin/tcpdump/tcpdump/Makefile
@@ -45,6 +45,10 @@ CFLAGS+= -I${.CURDIR} -I${TCPDUMP_DISTDIR}
 CFLAGS+= -DHAVE_CONFIG_H
 CFLAGS+= -D_U_="__attribute__((unused))"
 
+# Enable tcpdump heuristic to identify TSO-generated packets; see
+# http://www.mail-archive.com/tcpdump-workers@lists.tcpdump.org/msg01051.html
+CFLAGS+= -DGUESS_TSO
+
 .if ${MK_INET6_SUPPORT} != "no"
 SRCS+=	print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c \
 	print-icmp6.c print-babel.c print-frag6.c print-rt6.c print-ospf6.c \



More information about the freebsd-net mailing list