Re: [PATCH net v3 4/5] packet: infer protocol from ethernet header if unset

2015-11-11 Thread Willem de Bruijn
On Wed, Nov 11, 2015 at 5:25 PM, Daniel Borkmann wrote: > In case no struct sockaddr_ll has been passed to packet > socket's sendmsg() when doing a TX_RING flush run, then > skb->protocol is set to po->num instead, which is the protocol > passed via socket(2)/bind(2). > > Applications only xmittin

[PATCH net v3 4/5] packet: infer protocol from ethernet header if unset

2015-11-11 Thread Daniel Borkmann
In case no struct sockaddr_ll has been passed to packet socket's sendmsg() when doing a TX_RING flush run, then skb->protocol is set to po->num instead, which is the protocol passed via socket(2)/bind(2). Applications only xmitting can go the path of allocating the socket as socket(PF_PACKET, , 0)