Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/net Pull up following revision(s) (requested by rmind...



details:   https://anonhg.NetBSD.org/src/rev/540f2b78d376
branches:  netbsd-7
changeset: 798367:540f2b78d376
user:      snj <snj%NetBSD.org@localhost>
date:      Sun Sep 21 18:41:39 2014 +0000

description:
Pull up following revision(s) (requested by rmind in ticket #106):
        sys/net/bpf.c: revision 1.189
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 7b49d858ce24 -r 540f2b78d376 sys/net/bpf.c
--- a/sys/net/bpf.c     Sun Sep 21 18:38:53 2014 +0000
+++ b/sys/net/bpf.c     Sun Sep 21 18:41:39 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf.c,v 1.187 2014/08/07 03:40:21 ozaki-r Exp $        */
+/*     $NetBSD: bpf.c,v 1.187.2.1 2014/09/21 18:41:39 snj Exp $        */
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.187 2014/08/07 03:40:21 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.187.2.1 2014/09/21 18:41:39 snj 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