Re: [PATCH nf-next] netfilter: nf_log: do not assume ethernet header in netdev family

2016-12-04 Thread Pablo Neira Ayuso
On Mon, Nov 14, 2016 at 10:39:25PM +0800, Liping Zhang wrote: > From: Liping Zhang > > In netdev family, we will handle non ethernet packets, so using > eth_hdr(skb)->h_proto is incorrect. > > Meanwhile, we can use socket(AF_PACKET...) to sending packets, so > skb->protocol

[PATCH nf-next] netfilter: nf_log: do not assume ethernet header in netdev family

2016-11-14 Thread Liping Zhang
From: Liping Zhang In netdev family, we will handle non ethernet packets, so using eth_hdr(skb)->h_proto is incorrect. Meanwhile, we can use socket(AF_PACKET...) to sending packets, so skb->protocol is not always set in bridge family. Add an extra parameter into