summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorLiping Zhang <zlpnobody@gmail.com>2016-11-14 15:39:25 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-12-04 20:45:33 +0100
commit673ab46f345557e9d741e97ca0301280360d1af1 (patch)
tree7274e919256ae409a0657306e823df780dff6282 /include/net
parentnetfilter: built-in NAT support for UDPlite (diff)
downloadlinux-673ab46f345557e9d741e97ca0301280360d1af1.tar.xz
linux-673ab46f345557e9d741e97ca0301280360d1af1.zip
netfilter: nf_log: do not assume ethernet header in netdev family
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 nf_log_l2packet to solve this issue. Fixes: 1fddf4bad0ac ("netfilter: nf_log: add packet logging for netdev family") Signed-off-by: Liping Zhang <zlpnobody@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netfilter/nf_log.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/netfilter/nf_log.h b/include/net/netfilter/nf_log.h
index a559aa41253c..450f87f95415 100644
--- a/include/net/netfilter/nf_log.h
+++ b/include/net/netfilter/nf_log.h
@@ -109,7 +109,9 @@ void nf_log_dump_packet_common(struct nf_log_buf *m, u_int8_t pf,
const struct net_device *out,
const struct nf_loginfo *loginfo,
const char *prefix);
-void nf_log_l2packet(struct net *net, u_int8_t pf, unsigned int hooknum,
+void nf_log_l2packet(struct net *net, u_int8_t pf,
+ __be16 protocol,
+ unsigned int hooknum,
const struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,