diff options
| author | 2001-06-26 22:51:02 +0000 | |
|---|---|---|
| committer | 2001-06-26 22:51:02 +0000 | |
| commit | 3770815a84e66c9427058445b6fa66b1f409ee30 (patch) | |
| tree | bc885c0ae0b6180bc22869f74a83e0ca5bf1b73b /usr.sbin/tcpdump/print-pflog.c | |
| parent | Add mvmeppc (diff) | |
| download | wireguard-openbsd-3770815a84e66c9427058445b6fa66b1f409ee30.tar.xz wireguard-openbsd-3770815a84e66c9427058445b6fa66b1f409ee30.zip | |
fix PFRES_MAX handling
Diffstat (limited to 'usr.sbin/tcpdump/print-pflog.c')
| -rw-r--r-- | usr.sbin/tcpdump/print-pflog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-pflog.c b/usr.sbin/tcpdump/print-pflog.c index 22d083f5923..4fead2387e0 100644 --- a/usr.sbin/tcpdump/print-pflog.c +++ b/usr.sbin/tcpdump/print-pflog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-pflog.c,v 1.5 2001/06/26 22:26:14 deraadt Exp $ */ +/* $OpenBSD: print-pflog.c,v 1.6 2001/06/26 22:51:03 deraadt Exp $ */ /* * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996 @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-pflog.c,v 1.5 2001/06/26 22:26:14 deraadt Exp $ (LBL)"; + "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-pflog.c,v 1.6 2001/06/26 22:51:03 deraadt Exp $ (LBL)"; #endif #include <sys/param.h> @@ -84,7 +84,7 @@ pflog_if_print(u_char *user, const struct pcap_pkthdr *h, hdr = (struct pfloghdr *)p; res = ntohs(hdr->reason); - why = (res <= PFRES_MAX) ? pf_reasons[res] : "unkn"; + why = (res < PFRES_MAX) ? pf_reasons[res] : "unkn"; snprintf(reason, sizeof(reason), "%d(%s)", res, why); |
