Hello,
Removing my usb network interface during `tcpdump -i rum0` caused my
kernel to crash. A fix is attached.
Thanks,
Moritz Buhl
Index: net/bpf.c
===================================================================
RCS file: /cvs/src/sys/net/bpf.c,v
retrieving revision 1.169
diff -u -p -r1.169 bpf.c
--- net/bpf.c 2 Mar 2018 16:57:41 -0000 1.169
+++ net/bpf.c 4 Jul 2018 19:42:35 -0000
@@ -332,7 +332,8 @@ bpf_detachd(struct bpf_d *d)
mtx_enter(&d->bd_mtx);
bpf_put(d);
- if (error && !(error == EINVAL || error == ENODEV))
+ if (error && !(error == EINVAL || error == ENODEV ||
+ error == ENXIO))
/*
* Something is really wrong if we were able to put
* the driver into promiscuous mode, but can't