Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754153Ab1DDNys (ORCPT ); Mon, 4 Apr 2011 09:54:48 -0400 Received: from stinky.trash.net ([213.144.137.162]:52837 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751544Ab1DDNyr (ORCPT ); Mon, 4 Apr 2011 09:54:47 -0400 Message-ID: <4D99CDA0.3030305@trash.net> Date: Mon, 04 Apr 2011 15:54:40 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100620 Icedove/3.0.5 MIME-Version: 1.0 To: David Miller CC: rostedt@goodmis.org, linux-kernel@vger.kernel.org, hidden@balabit.hu, akpm@linux-foundation.org, netfilter-devel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] netfilter: Fix build failure when ipv6 but xt_tproxy is built in References: <1301451199.14261.327.camel@gandalf.stny.rr.com> <20110329.223536.245392030.davem@davemloft.net> In-Reply-To: <20110329.223536.245392030.davem@davemloft.net> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2233 Lines: 63 On 30.03.2011 07:35, David Miller wrote: > From: Steven Rostedt > Date: Tue, 29 Mar 2011 22:13:19 -0400 > >> While running ktest.pl doing ranconfigs, the following build error >> occurred: > > Is sending netfilter patches to the explicitly listed maintainer in > MAINTAINERS too much to ask Stephen? :-/ > > CC:'d > >> >> 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. I don't think this is a good fix for the problem since it may lead to the confusing situation that both TPROXY and ip6tables are enabled, but TPROXY has no IPv6 support. I think we should solve this by either adding a Kconfig dependency on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n) or using ipv6_skip_exthdr() instead of ipv6_find_hdr(). Krisztian, what do you think? >> >> Signed-off-by: Steven Rostedt >> >> 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 >> >> -#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 >> #include >> >> > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/