can't call pcap_datalink before activate.

This commit is contained in:
christos 2017-03-25 11:00:27 +00:00
parent 8ff4d6477a
commit 624bfdf064
1 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: npfd_log.c,v 1.9 2017/01/24 20:25:08 christos Exp $ */
/* $NetBSD: npfd_log.c,v 1.10 2017/03/25 11:00:27 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: npfd_log.c,v 1.9 2017/01/24 20:25:08 christos Exp $");
__RCSID("$NetBSD: npfd_log.c,v 1.10 2017/03/25 11:00:27 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -91,7 +91,6 @@ npfd_log_gethdr(npfd_log_t *ctx, struct pcap_file_header*hdr)
if (hdr->magic != TCPDUMP_MAGIC ||
hdr->version_major != PCAP_VERSION_MAJOR ||
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;