public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: Fix build failure when ipv6 but xt_tproxy is built in
@ 2011-03-30  2:13 Steven Rostedt
  2011-03-30  5:35 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2011-03-30  2:13 UTC (permalink / raw)
  To: LKML; +Cc: David S. Miller, KOVACS Krisztian, Andrew Morton

While running ktest.pl doing ranconfigs, the following build error
occurred:

net/built-in.o: In function `tproxy_tg6_v1':
/home/rostedt/work/autotest/nobackup/linux-test.git/net/netfilter/xt_TPROXY.c:288: undefined reference to `ipv6_find_hdr'

This happened because the xt_TPROXY code was compiled into the kernel
proper, but the ipv6 netfilter was compiled as a module. The fix is to
only enter the code that calls ipv6_find_hdr if ipv6 netfilter is
compiled into the kernel, or if it is a module, so is the xt_TPROXY
code.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/net/netfilter/xt_TPROXY.c b/net/netfilter/xt_TPROXY.c
index dcfd57e..5915f94 100644
--- a/net/netfilter/xt_TPROXY.c
+++ b/net/netfilter/xt_TPROXY.c
@@ -22,7 +22,13 @@
 
 #include <net/netfilter/ipv4/nf_defrag_ipv4.h>
 
-#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
+/*
+ * Only include the following if ip6 tables is compiled in
+ * the kernel, or it is a module and this code is also a module.
+ */
+#if defined(CONFIG_IP6_NF_IPTABLES) || \
+	(defined(CONFIG_IP6_NF_IPTABLES_MODULE) && \
+	 defined(CONFIG_NETFILTER_XT_TARGET_TPROXY_MODULE))
 #define XT_TPROXY_HAVE_IPV6 1
 #include <net/if_inet6.h>
 #include <net/addrconf.h>



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-06 12:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-30  2:13 [PATCH] netfilter: Fix build failure when ipv6 but xt_tproxy is built in Steven Rostedt
2011-03-30  5:35 ` David Miller
2011-03-30 10:18   ` Steven Rostedt
2011-04-04 13:54   ` Patrick McHardy
2011-04-05 14:43     ` KOVACS Krisztian
2011-04-05 14:49       ` Patrick McHardy
2011-04-06 12:08         ` KOVACS Krisztian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox