diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-05-08 01:01:36 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-05-08 01:01:36 +0000 |
commit | 97ea8f0a797a731e94768a4f2d6e4809ed88ea83 (patch) | |
tree | 2f5a46d49177f63e1c6618f1b29fdd8597be3936 /usr.sbin/tcpdump | |
parent | ff48f79f5d58f584f9327aea84c4f7d9314c99b4 (diff) |
Pass the length of what was captured to pfsync_print, not the length
of the original packet.
ok beck@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r-- | usr.sbin/tcpdump/print-ip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-ip.c b/usr.sbin/tcpdump/print-ip.c index 09f38d32353..5382e2729b6 100644 --- a/usr.sbin/tcpdump/print-ip.c +++ b/usr.sbin/tcpdump/print-ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-ip.c,v 1.25 2004/04/28 02:17:03 mcbride Exp $ */ +/* $OpenBSD: print-ip.c,v 1.26 2004/05/08 01:01:35 mcbride 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-ip.c,v 1.25 2004/04/28 02:17:03 mcbride Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ip.c,v 1.26 2004/05/08 01:01:35 mcbride Exp $ (LBL)"; #endif #include <sys/param.h> @@ -569,7 +569,9 @@ ip_print(register const u_char *bp, register u_int length) #define IPPROTO_PFSYNC 240 #endif case IPPROTO_PFSYNC: - pfsync_ip_print(cp, len, (const u_char *)ip); + pfsync_ip_print(cp, + (int)(snapend - (u_char *)ip) - hlen, + (const u_char *)ip); break; default: |