Module Name: src
Committed By: christos
Date: Tue Jan 24 20:25:08 UTC 2017
Modified Files:
src/usr.sbin/npf/npfd: npfd_log.c
Log Message:
fix signed compare
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/npf/npfd/npfd_log.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/npf/npfd/npfd_log.c
diff -u src/usr.sbin/npf/npfd/npfd_log.c:1.8 src/usr.sbin/npf/npfd/npfd_log.c:1.9
--- src/usr.sbin/npf/npfd/npfd_log.c:1.8 Sat Jan 7 11:48:03 2017
+++ src/usr.sbin/npf/npfd/npfd_log.c Tue Jan 24 15:25:08 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: npfd_log.c,v 1.8 2017/01/07 16:48:03 christos Exp $ */
+/* $NetBSD: npfd_log.c,v 1.9 2017/01/24 20:25:08 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: npfd_log.c,v 1.8 2017/01/07 16:48:03 christos Exp $");
+__RCSID("$NetBSD: npfd_log.c,v 1.9 2017/01/24 20:25:08 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -90,7 +90,9 @@ npfd_log_gethdr(npfd_log_t *ctx, struct
case 1:
if (hdr->magic != TCPDUMP_MAGIC ||
hdr->version_major != PCAP_VERSION_MAJOR ||
- hdr->version_minor != PCAP_VERSION_MINOR)
+ hdr->version_minor != PCAP_VERSION_MINOR ||
+ hdr->linktype != (u_int)pcap_datalink(ctx->pcap) ||
+ hdr->sigfigs != (u_int)pcap_get_tstamp_precision(ctx->pcap))
goto out;
break;
default: