OpenBSD cvs log

created 2019-05-08T05:01:41Z
begin 2018-01-24T00:00:00Z
end 2018-01-25T00:00:00Z
path src/sys
commits 4

date 2018-01-24T00:25:17Z
author dlg
files src/sys/net/bpf.c log diff annotate
src/sys/net/bpf.h log diff annotate
src/sys/net/bpfdesc.h log diff annotate
message add support for bpf on "subsystems", not just network interfaces

bpf assumed that it was being unconditionally attached to network
interfaces, and maintained a pointer to a struct ifnet *. this was
mostly used to get at the name of the interface, which is how
userland asks to be attached to a particular interface. this diff
adds a pointer to the name and uses it instead of the interface
pointer for these lookups. this in turn allows bpf to be attached
to arbitrary subsystems in the kernel which just have to supply a
name rather than an interface pointer. for example, bpf could be
attached to pf_test so you can see what packets are about to be
filtered. mpi@ is using this to look at usb transfers.

bpf still uses the interface pointer for bpfwrite, and for enabling
and disabling promisc. however, these are nopped out for subsystems.

ok mpi@

date 2018-01-24T13:04:22Z
author patrick
files src/sys/dev/ic/bwfm.c log diff annotate
message We don't do booleans in the kernel, so replace a few occurrences of 'true'
with nicer integer equivalents.

Spotted by and ok stsp@

date 2018-01-24T13:07:31Z
author patrick
files src/sys/dev/ic/bwfm.c log diff annotate
message Put the default case, which prints information about an event we do not yet
handle, into a debug printf. Also do not print a pointer to kernel buffers
so that we don't leak kernel addresses.

Spotted by and ok stsp@

date 2018-01-24T13:10:20Z
author patrick
files src/sys/dev/usb/if_bwfm_usb.c log diff annotate
message Do not print that the firmware was successfully loaded in the USB backend
driver. It is only useful to know if firmware loading has failed. This
means fewer clutter in dmesg(8).

Spotted by and ok stsp@