From: Matthew Luckie Subject: Re: [patch] change BPF filters without discarding buffered packets To: David Gwynne Cc: tech@openbsd.org Date: Fri, 9 Aug 2024 17:12:28 +1200 On Fri, Aug 09, 2024 at 02:45:34PM +1000, David Gwynne wrote: > This makes sense to me and reads well too. What are you using it for? I'm using it in ports/net/scamper, which wants select ICMP/TCP/UDP packets, but the exact packets it wants changes over time depending on the tests. You can see the simple compiler in scamper/scamper_dl.c -- dl_filter_compile(). FWIW, I don't need the BIOCSETWF changes -- it just strikes me as odd that the read buffer gets emptied when the write filter gets changed.