Thread (12 messages) flat view 12 messages, 2 authors, 2017-01-04

Re: [PATCH net-next 2/2] tools: psock_tpacket: verify that packet was received on lo before counting it

From: Sowmini Varadhan <hidden>
Date: 2017-01-04 14:44:56

On (01/04/17 09:30), Willem de Bruijn wrote:
The common and simpler solution to this problem is to open the socket
with protocol 0 to reject all packets, add the BPF filter and only then bind
with sll_ifindex set to lo. That way no false positives can arrive.
Yes, I thought of that too (and I've seen that done in one commercial
implementation), but given that tpacket nicely returns the incoming
interface, I figured, why not use the test prog to use this (thus
verifying it, and also showing how to use it)

--Sowmini
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help