From: liusdu <liusdu@126.com>
To: Florian Westphal <fw@strlen.de>, Liu Hua <sdu.liu@huawei.com>
Cc: davem@davemloft.net, kadlec@blackhole.kfki.hu, kaber@trash.net,
pablo@netfilter.org, netfilter-devel@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netfilter: fix dependency issues between IPv6 defragmentation and ip6tables
Date: Sun, 03 May 2015 22:18:26 +0800 [thread overview]
Message-ID: <55462E32.2060806@126.com> (raw)
In-Reply-To: <20150503110715.GE22481@breakpoint.cc>
On 2015年05月03日 19:07, Florian Westphal wrote:
> Liu Hua <sdu.liu@huawei.com> wrote:
>> commit f6318e558806c925029dc101f14874be9f9fa78f fix some related issue
>> when ip6tables is enabled. But when IP6_NF_IPTABLES is disabled and
>> NETFILTER_XT_TARGET_TPROXY is enabled. We will meet build failure with
>> "net/built-in.o: In function `tproxy_tg_init':
>> net/netfilter/xt_TPROXY.c:588: undefined reference to `nf_defrag_ipv6_enable'
>> "
>> So this patch change the Kconfig as ipv4 does.
>> --- a/net/netfilter/Kconfig
>> +++ b/net/netfilter/Kconfig
>> @@ -865,7 +865,7 @@ config NETFILTER_XT_TARGET_TPROXY
>> depends on (IPV6 || IPV6=n)
>> depends on IP_NF_MANGLE
>> select NF_DEFRAG_IPV4
>> - select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES
>> + select NF_DEFRAG_IPV6
> IP6_NF_IPTABLES
> If IP6_NF_IPTABLES is not set, why would we have to pick
> up IPV6 defragmentation?
>
> Without ip6tables, TPROXY cannot be used for ipv6; in fact;
> xt_TPROXY should be built without ipv6 support in this case.
>
> My guess is that you have TPROXY=y but DEFRAG_IPV6=m, but that
> might warrant a better fix (xt_socket seems to have same issue).
Hi Florian,
Yes, It was exactly what I did. Actually there is a macro to
determine whether we compile nf_defrag_ipv6_enable or not,
called XT_TPROXY_HAVE_IPV6, which will be set to 1 while
IP6_NF_IPTABLES=y or m. With the patch below we can
make the compiling pass. But I am not sure it is good enough
or not.
diff --git a/net/netfilter/xt_TPROXY.c b/net/netfilter/xt_TPROXY.c
index cca96ce..abbda64 100644
--- a/net/netfilter/xt_TPROXY.c
+++ b/net/netfilter/xt_TPROXY.c
@@ -24,7 +24,7 @@
#include <net/netfilter/ipv4/nf_defrag_ipv4.h>
-#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
+#if IS_BUILTIN(CONFIG_IP6_NF_IPTABLES)
#define XT_TPROXY_HAVE_IPV6 1
#include <net/if_inet6.h>
#include <net/addrconf.h>
diff --git a/net/netfilter/xt_socket.c b/net/netfilter/xt_socket.c
index e092cb0..239fccf 100644
--- a/net/netfilter/xt_socket.c
+++ b/net/netfilter/xt_socket.c
@@ -21,7 +21,7 @@
#include <net/inet_sock.h>
#include <net/netfilter/ipv4/nf_defrag_ipv4.h>
-#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
+#if IS_BUILTIN(CONFIG_IP6_NF_IPTABLES)
#define XT_SOCKET_HAVE_IPV6 1
#include <linux/netfilter_ipv6/ip6_tables.h>
#include <net/inet6_hashtables.h>
next prev parent reply other threads:[~2015-05-03 14:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-03 9:50 [PATCH] netfilter: fix dependency issues between IPv6 defragmentation and ip6tables Liu Hua
2015-05-03 11:07 ` Florian Westphal
2015-05-03 14:18 ` liusdu [this message]
2015-05-03 20:09 ` Florian Westphal
2015-05-04 15:56 ` liusdu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55462E32.2060806@126.com \
--to=liusdu@126.com \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=sdu.liu@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).