diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2004-09-16 11:29:52 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2004-09-16 11:29:52 +0000 |
commit | 187c498a64350d94f6d7e6b5ccce16846ba17cc6 (patch) | |
tree | 57df6e76c17af1f10afff862146e5826ddc5fb34 /usr.sbin/tcpdump/print-tcp.c | |
parent | 4dac3d3209fe626d76e421427eecb510c76e8b4a (diff) |
add -T tcp to enforce interpretation as TCP
Diffstat (limited to 'usr.sbin/tcpdump/print-tcp.c')
-rw-r--r-- | usr.sbin/tcpdump/print-tcp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-tcp.c b/usr.sbin/tcpdump/print-tcp.c index 117b9e625a9..6313372d992 100644 --- a/usr.sbin/tcpdump/print-tcp.c +++ b/usr.sbin/tcpdump/print-tcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-tcp.c,v 1.21 2004/08/10 19:55:07 markus Exp $ */ +/* $OpenBSD: print-tcp.c,v 1.22 2004/09/16 11:29:51 markus Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-tcp.c,v 1.21 2004/08/10 19:55:07 markus Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-tcp.c,v 1.22 2004/09/16 11:29:51 markus Exp $ (LBL)"; #endif #include <sys/param.h> @@ -264,7 +264,8 @@ tcp_print(register const u_char *bp, register u_int length, if (qflag) { (void)printf("tcp %d", length - tp->th_off * 4); return; - } else { + } else if (packettype != PT_TCP) { + /* * If data present and NFS port used, assume NFS. * Pass offset of data plus 4 bytes for RPC TCP msg length |