netfilter: nf_dup{4, 6}: fix build error when nf_conntrack disabled
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 2 Sep 2015 18:54:02 +0000 (20:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Sep 2015 23:28:06 +0000 (16:28 -0700)
While testing various Kconfig options on another issue, I found that
the following one triggers as well on allmodconfig and nf_conntrack
disabled:

  net/ipv4/netfilter/nf_dup_ipv4.c: In function ‘nf_dup_ipv4’:
  net/ipv4/netfilter/nf_dup_ipv4.c:72:20: error: ‘nf_skb_duplicated’ undeclared (first use in this function)
    if (this_cpu_read(nf_skb_duplicated))
  [...]
  net/ipv6/netfilter/nf_dup_ipv6.c: In function ‘nf_dup_ipv6’:
  net/ipv6/netfilter/nf_dup_ipv6.c:66:20: error: ‘nf_skb_duplicated’ undeclared (first use in this function)
    if (this_cpu_read(nf_skb_duplicated))

Fix it by including directly the header where it is defined.

Fixes: bbde9fc1824a ("netfilter: factor out packet duplication for IPv4/IPv6")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/nf_dup_ipv4.c
net/ipv6/netfilter/nf_dup_ipv6.c

index b5bb37564b0e5094534a2acef57f7f5a31a3b75b..2d79e6e8d934dbd41080b2c6a658569e2ce00c53 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/percpu.h>
 #include <linux/route.h>
 #include <linux/skbuff.h>
+#include <linux/netfilter.h>
 #include <net/checksum.h>
 #include <net/icmp.h>
 #include <net/ip.h>
index c5c87e921ccde91e047d587b712bca01030e430f..c8ab626556a02837506a30a26fdc1fbdf075480d 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/percpu.h>
 #include <linux/skbuff.h>
+#include <linux/netfilter.h>
 #include <net/ipv6.h>
 #include <net/ip6_route.h>
 #include <net/netfilter/ipv6/nf_dup_ipv6.h>