summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/net/bpf.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-20 15:53:03 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-21 10:29:39 +0200
commit18fa92c2dcc6c52e0bf27d214d80f0c25a89b47d (patch)
treea3020ac5b1f366f2f0920941b589808e435dbcee /freebsd/sys/net/bpf.c
parentUpdate to FreeBSD head 2017-12-01 (diff)
downloadrtems-libbsd-18fa92c2dcc6c52e0bf27d214d80f0c25a89b47d.tar.bz2
Update to FreeBSD head 2018-02-01
Git mirror commit d079ae0442af8fa3cfd6d7ede190d04e64a2c0d4. Update #3472.
Diffstat (limited to 'freebsd/sys/net/bpf.c')
-rw-r--r--freebsd/sys/net/bpf.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/freebsd/sys/net/bpf.c b/freebsd/sys/net/bpf.c
index 6fc6b435..e6ad9e25 100644
--- a/freebsd/sys/net/bpf.c
+++ b/freebsd/sys/net/bpf.c
@@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sockio.h>
#include <sys/ttycom.h>
#include <sys/uio.h>
+#include <sys/sysent.h>
#include <sys/event.h>
#include <sys/file.h>
@@ -728,7 +729,7 @@ bpf_check_upgrade(u_long cmd, struct bpf_d *d, struct bpf_insn *fcode, int flen)
* Check if cmd looks like snaplen setting from
* pcap_bpf.c:pcap_open_live().
* Note we're not checking .k value here:
- * while pcap_open_live() definitely sets to to non-zero value,
+ * while pcap_open_live() definitely sets to non-zero value,
* we'd prefer to treat k=0 (deny ALL) case the same way: e.g.
* do not consider upgrading immediately
*/
@@ -1396,9 +1397,11 @@ bpfioctl(struct bpf_d *d, u_long cmd, caddr_t addr, int flags,
case BIOCGDLTLIST32:
case BIOCGRTIMEOUT32:
case BIOCSRTIMEOUT32:
- BPFD_LOCK(d);
- d->bd_compat32 = 1;
- BPFD_UNLOCK(d);
+ if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) {
+ BPFD_LOCK(d);
+ d->bd_compat32 = 1;
+ BPFD_UNLOCK(d);
+ }
}
#endif