I have a multi-threaded(2 threads) application which use BPF filters , where in each thread uses a PF_PACKET socket and tries to apply a BPF filter using SO_ATTACH_FILTER on the same incoming interface. But what i observe is that both the threads are receiving all the packets matching both the filters rather than each thread receiving only for the filter they have added. Is this how it is suppose to work or should i do anything else explicitly to achieve this kind of filtering ?
Asked
Active
Viewed 224 times
0
-
Welcome to StackOverflow! Could you add a minimal example code to your question so we can help? – pchaigno Aug 07 '19 at 08:41
-
I'm writing a sample application to demonstrate the same would post it here as soon as i have it. – Madhu Aug 07 '19 at 08:44
-
I figured out it was not an issue with BPF filtering but it was something in my application so i'm good with it now. – Madhu Aug 08 '19 at 07:17
-
You can remove this question then as it serves no purpose ;) – pchaigno Aug 08 '19 at 07:26
-
Or you can answer your own question, so anybody else seeing that issue can see how you fixed the problem. – user9065877 Aug 18 '19 at 01:50