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

2018-09-05 Thread David Miller
From: Vincent Whitchurch Date: Mon, 3 Sep 2018 16:23:36 +0200 > 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 filt

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

2018-09-03 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