diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2003-12-19 22:35:58 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2003-12-19 22:35:58 +0000 |
commit | 827fcbeb560ebcc383d272d0218e95bc68d034f9 (patch) | |
tree | 91f4e834b85256dcb908291a4ebad38fdc784678 /usr.sbin/tcpdump | |
parent | a0d519fc3c9de24f44bbdd1b04b1610aa18fa338 (diff) |
Calculate the length of the captured pfsync payload correctly when printing
pfsync packets recieved on the wire. Prevents printing of giberish states
with snaplen smaller than the mtu of syncif on the sender, and probably
other ungoodness.
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r-- | usr.sbin/tcpdump/print-pfsync.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-pfsync.c b/usr.sbin/tcpdump/print-pfsync.c index fb749ceb991..0b80d5d0f7d 100644 --- a/usr.sbin/tcpdump/print-pfsync.c +++ b/usr.sbin/tcpdump/print-pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-pfsync.c,v 1.13 2003/12/15 07:11:31 mcbride Exp $ */ +/* $OpenBSD: print-pfsync.c,v 1.14 2003/12/19 22:35:57 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -28,7 +28,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-pfsync.c,v 1.13 2003/12/15 07:11:31 mcbride Exp $"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-pfsync.c,v 1.14 2003/12/19 22:35:57 mcbride Exp $"; #endif #include <sys/param.h> @@ -98,7 +98,7 @@ pfsync_ip_print(const u_char *bp, u_int len, const u_char *bp2) if (len < PFSYNC_HDRLEN) printf("[|pfsync]"); else - pfsync_print(hdr, (len - sizeof(struct pfsync_header) + hlen)); + pfsync_print(hdr, (len - sizeof(struct pfsync_header) - hlen)); } void |