⬢ DragonFlyBSD Kernel Audit
DF-5531 / fix.diff
← back to finding ↓ download raw
--- a/sys/bus/u4b/usb_pf.c
+++ b/sys/bus/u4b/usb_pf.c
@@ -361,6 +361,8 @@
 	/* sanity checks */
 	if (bus->ifp == NULL)
 		return;
+	if (bus->ifp->if_bpf == NULL)	/* no bpf listener attached */
+		return;
 #if 0 /* XXX this is not needed on dragonfly */
 	if (!bpf_peers_present(bus->ifp->if_bpf))
 		return;