summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump/print-pfsync.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2009-03-31 01:21:30 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2009-03-31 01:21:30 +0000
commit65ed0dcb6076e246d39ecdea85f9f3341844daac (patch)
treeeaed9bb75bb0720a3bddacc3ab4e962bd2fb7158 /usr.sbin/tcpdump/print-pfsync.c
parent2203b6a52fc2a70b8f6ecaf03de94b0cc56bc85a (diff)
do not include space in the end of the from for a hmac. after discussion
with deraadt@, mcbride@, and mpf@ it is obvious that a hmac doesnt make sense for pfsync. this also firms up some of the input parsing so it handles short frames a bit better.
Diffstat (limited to 'usr.sbin/tcpdump/print-pfsync.c')
-rw-r--r--usr.sbin/tcpdump/print-pfsync.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/usr.sbin/tcpdump/print-pfsync.c b/usr.sbin/tcpdump/print-pfsync.c
index f2018f2f46b..f54b4d6c9a6 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.34 2009/02/23 10:28:16 dlg Exp $ */
+/* $OpenBSD: print-pfsync.c,v 1.35 2009/03/31 01:21:29 dlg Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -28,7 +28,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Id: print-pfsync.c,v 1.34 2009/02/23 10:28:16 dlg Exp $";
+ "@(#) $Id: print-pfsync.c,v 1.35 2009/03/31 01:21:29 dlg Exp $";
#endif
#include <sys/param.h>
@@ -137,7 +137,7 @@ struct pfsync_actions actions[] = {
{ 0, NULL },
{ sizeof(struct pfsync_bus), pfsync_print_bus },
{ sizeof(struct pfsync_tdb), pfsync_print_tdb },
- { sizeof(struct pfsync_eof), pfsync_print_eof }
+ { 0, pfsync_print_eof }
};
void
@@ -181,7 +181,7 @@ pfsync_print(struct pfsync_header *hdr, const u_char *bp, int len)
printf("\n act %s count %d", actnames[subh->action], count);
alen = actions[subh->action].len;
- if (alen == 0) {
+ if (actions[subh->action].print == NULL) {
printf("\n unimplemented action");
return;
}
@@ -324,12 +324,5 @@ pfsync_print_tdb(int flags, const void *bp)
int
pfsync_print_eof(int flags, const void *bp)
{
- const struct pfsync_eof *eof = bp;
- int i;
-
- printf("\n\thmac: ");
- for (i = 0; i < sizeof(eof->hmac); i++)
- printf("%02x", eof->hmac[i]);
-
- return (0);
+ return (1);
}