summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r--sys/net/bpf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 702bf43047a..7d44697c2b3 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.29 2001/09/15 20:40:46 frantzen Exp $ */
+/* $OpenBSD: bpf.c,v 1.30 2001/10/02 18:04:35 deraadt Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -1069,6 +1069,8 @@ bpf_catchpacket(d, pkt, pktlen, snaplen, cpfn)
register struct bpf_hdr *hp;
register int totlen, curlen;
register int hdrlen = d->bd_bif->bif_hdrlen;
+ struct timeval tv;
+
/*
* Figure out how many bytes to move. If the packet is
* greater or equal to the snapshot length, transfer that
@@ -1113,7 +1115,9 @@ bpf_catchpacket(d, pkt, pktlen, snaplen, cpfn)
* Append the bpf header.
*/
hp = (struct bpf_hdr *)(d->bd_sbuf + curlen);
- microtime(&hp->bh_tstamp);
+ microtime(&tv);
+ hp->bh_tstamp.tv_sec = tv.tv_sec;
+ hp->bh_tstamp.tv_usec = tv.tv_usec;
hp->bh_datalen = pktlen;
hp->bh_hdrlen = hdrlen;
/*