lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1301451199.14261.327.camel@gandalf.stny.rr.com>
Date:	Tue, 29 Mar 2011 22:13:19 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	"David S. Miller" <davem@...emloft.net>,
	KOVACS Krisztian <hidden@...abit.hu>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] netfilter: Fix build failure when ipv6 but xt_tproxy is
 built in

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@...dmis.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>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ