call klist_invalidate from bpfsdetach to tell kq listeners what happened.
authordlg <dlg@openbsd.org>
Fri, 23 Apr 2021 03:43:19 +0000 (03:43 +0000)
committerdlg <dlg@openbsd.org>
Fri, 23 Apr 2021 03:43:19 +0000 (03:43 +0000)
commitd0a032833e148e63aad8a4916137e1a84b01c01f
tree4855aa980524458ee8cd8cf2a7d3c247efef1a0d
parentc202673480ce60c9d08dcd83e1aecb53dcf67f2a
call klist_invalidate from bpfsdetach to tell kq listeners what happened.

without this, something using a kevent to monitor a bpf fd on an
idle interface never has the event fire, which means it never
realises the interface goes away. with this, the read event goes
off and the next read fails with EIO, like pretty much every other
driver when the underlying device is removed.

ok claudio@ visa@ jmatthew@
sys/net/bpf.c