From: David Gwynne Subject: Re: [patch] change BPF filters without discarding buffered packets To: Matthew Luckie Cc: tech@openbsd.org Date: Fri, 9 Aug 2024 15:45:45 +1000 On 09/08/2024 15:12, Matthew Luckie wrote: > 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(). i have a different understanding of simple to you, but looks plausible :D > 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. Yeah, it would be easy to fallback to the current ioctl with an #ifdef. Unless anyone objects I'll commit it next week. dlg