summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf_zerocopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/bpf_zerocopy.c')
-rw-r--r--sys/net/bpf_zerocopy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/net/bpf_zerocopy.c b/sys/net/bpf_zerocopy.c
index 1fa07e2..d746bda 100644
--- a/sys/net/bpf_zerocopy.c
+++ b/sys/net/bpf_zerocopy.c
@@ -496,6 +496,11 @@ bpf_zerocopy_ioctl_setzbuf(struct thread *td, struct bpf_d *d,
zbuf_free(zbb);
return (EINVAL);
}
+
+ /*
+ * Point BPF descriptor at buffers; initialize sbuf as zba so that
+ * it is always filled first in the sequence, per bpf(4).
+ */
d->bd_fbuf = (caddr_t)zbb;
d->bd_sbuf = (caddr_t)zba;
d->bd_slen = 0;
OpenPOWER on IntegriCloud