Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net PR/49190: bpf_deliver: set scratch memory store in b...
details: https://anonhg.NetBSD.org/src/rev/4acdd1e3bcf1
branches: trunk
changeset: 332268:4acdd1e3bcf1
user: rmind <rmind%NetBSD.org@localhost>
date: Sat Sep 13 17:18:45 2014 +0000
description:
PR/49190: bpf_deliver: set scratch memory store in bpf_args_t.
diffstat:
sys/net/bpf.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (49 lines):
diff -r 3d4236b4e717 -r 4acdd1e3bcf1 sys/net/bpf.c
--- a/sys/net/bpf.c Sat Sep 13 14:48:02 2014 +0000
+++ b/sys/net/bpf.c Sat Sep 13 17:18:45 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bpf.c,v 1.188 2014/09/05 09:22:22 matt Exp $ */
+/* $NetBSD: bpf.c,v 1.189 2014/09/13 17:18:45 rmind Exp $ */
/*
* Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.188 2014/09/05 09:22:22 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.189 2014/09/13 17:18:45 rmind Exp $");
#if defined(_KERNEL_OPT)
#include "opt_bpf.h"
@@ -1388,25 +1388,24 @@
bpf_deliver(struct bpf_if *bp, void *(*cpfn)(void *, const void *, size_t),
void *pkt, u_int pktlen, u_int buflen, const bool rcv)
{
- struct timespec ts;
+ const bpf_ctx_t *bc = NULL;
+ uint32_t mem[BPF_MEMWORDS];
bpf_args_t args = {
.pkt = (const uint8_t *)pkt,
.wirelen = pktlen,
.buflen = buflen,
- .mem = NULL,
+ .mem = mem,
.arg = NULL
};
- struct bpf_d *d;
-
- const bpf_ctx_t *bc = NULL;
bool gottime = false;
+ struct timespec ts;
/*
* Note that the IPL does not have to be raised at this point.
* The only problem that could arise here is that if two different
* interfaces shared any data. This is not the case.
*/
- for (d = bp->bif_dlist; d != NULL; d = d->bd_next) {
+ for (struct bpf_d *d = bp->bif_dlist; d != NULL; d = d->bd_next) {
u_int slen;
if (!d->bd_seesent && !rcv) {
Home |
Main Index |
Thread Index |
Old Index