Re: [PATCH net-next] packet: add sockopt to ignore outgoing packets

2018-08-30 Thread Willem de Bruijn
On Thu, Aug 30, 2018 at 6:12 AM Vincent Whitchurch wrote: > > Currently, the only way to ignore outgoing packets on a packet socket is > via the BPF filter. With MSG_ZEROCOPY, packets that are looped into > AF_PACKET are copied in dev_queue_xmit_nit(), and this copy happens even > if the filter r

[PATCH net-next] packet: add sockopt to ignore outgoing packets

2018-08-30 Thread Vincent Whitchurch
Currently, the only way to ignore outgoing packets on a packet socket is via the BPF filter. With MSG_ZEROCOPY, packets that are looped into AF_PACKET are copied in dev_queue_xmit_nit(), and this copy happens even if the filter run from packet_rcv() would reject them. So the presence of a packet