All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [TEMPORARY] net: netfilter: IPV6 XT sockets need CONFIG_NF_DEFRAG_IPV6
@ 2015-01-29 16:18 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-01-29 16:18 UTC (permalink / raw)
  To: netdev; +Cc: davem, KOVACS Krisztian, linux-arm-kernel

If IP6_NF_IPTABLES=m, NF_DEFRAG_IPV6 gets selected as a module as well
from NETFILTER_XT_MATCH_SOCKET, so the latter cannot be built-in, or
we get:

net/built-in.o: In function `socket_mt_init':
:(.init.text+0x32a0): undefined reference to `nf_defrag_ipv6_enable'
net/built-in.o: In function `tproxy_tg_init':
xt_TPROXY.c:582: undefined reference to `nf_defrag_ipv6_enable'

This adds one more dependency like the others to avoid the problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index b02660fa9eb0..2bd57d62a385 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -875,6 +875,7 @@ config NETFILTER_XT_TARGET_TPROXY
 	depends on NETFILTER_ADVANCED
 	depends on (IPV6 || IPV6=n)
 	depends on IP_NF_MANGLE
+	depends on (IP6_NF_IPTABLES || !IP6_NF_IPTABLES)
 	select NF_DEFRAG_IPV4
 	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES
 	help
@@ -1367,6 +1368,7 @@ config NETFILTER_XT_MATCH_SOCKET
 	depends on NETFILTER_ADVANCED
 	depends on !NF_CONNTRACK || NF_CONNTRACK
 	depends on (IPV6 || IPV6=n)
+	depends on (IP6_NF_IPTABLES || !IP6_NF_IPTABLES)
 	select NF_DEFRAG_IPV4
 	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES
 	help

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

* [PATCH] [TEMPORARY] net: netfilter: IPV6 XT sockets need CONFIG_NF_DEFRAG_IPV6
@ 2015-01-29 16:18 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-01-29 16:18 UTC (permalink / raw)
  To: linux-arm-kernel

If IP6_NF_IPTABLES=m, NF_DEFRAG_IPV6 gets selected as a module as well
from NETFILTER_XT_MATCH_SOCKET, so the latter cannot be built-in, or
we get:

net/built-in.o: In function `socket_mt_init':
:(.init.text+0x32a0): undefined reference to `nf_defrag_ipv6_enable'
net/built-in.o: In function `tproxy_tg_init':
xt_TPROXY.c:582: undefined reference to `nf_defrag_ipv6_enable'

This adds one more dependency like the others to avoid the problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index b02660fa9eb0..2bd57d62a385 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -875,6 +875,7 @@ config NETFILTER_XT_TARGET_TPROXY
 	depends on NETFILTER_ADVANCED
 	depends on (IPV6 || IPV6=n)
 	depends on IP_NF_MANGLE
+	depends on (IP6_NF_IPTABLES || !IP6_NF_IPTABLES)
 	select NF_DEFRAG_IPV4
 	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES
 	help
@@ -1367,6 +1368,7 @@ config NETFILTER_XT_MATCH_SOCKET
 	depends on NETFILTER_ADVANCED
 	depends on !NF_CONNTRACK || NF_CONNTRACK
 	depends on (IPV6 || IPV6=n)
+	depends on (IP6_NF_IPTABLES || !IP6_NF_IPTABLES)
 	select NF_DEFRAG_IPV4
 	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES
 	help

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

* Re: [PATCH] [TEMPORARY] net: netfilter: IPV6 XT sockets need CONFIG_NF_DEFRAG_IPV6
  2015-01-29 16:18 ` Arnd Bergmann
@ 2015-01-29 16:50   ` Arnd Bergmann
  -1 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-01-29 16:50 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: netdev, davem, KOVACS Krisztian

On Thursday 29 January 2015 17:18:59 Arnd Bergmann wrote:
> If IP6_NF_IPTABLES=m, NF_DEFRAG_IPV6 gets selected as a module as well
> from NETFILTER_XT_MATCH_SOCKET, so the latter cannot be built-in, or
> we get:

I messed up the subject line, the [TEMPORARY] was not meant to be
in there, and I also saw that the subject was mixed up too.

I will send it again with the proper subject.

	Arnd

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

* [PATCH] [TEMPORARY] net: netfilter: IPV6 XT sockets need CONFIG_NF_DEFRAG_IPV6
@ 2015-01-29 16:50   ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-01-29 16:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 29 January 2015 17:18:59 Arnd Bergmann wrote:
> If IP6_NF_IPTABLES=m, NF_DEFRAG_IPV6 gets selected as a module as well
> from NETFILTER_XT_MATCH_SOCKET, so the latter cannot be built-in, or
> we get:

I messed up the subject line, the [TEMPORARY] was not meant to be
in there, and I also saw that the subject was mixed up too.

I will send it again with the proper subject.

	Arnd

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

* Re: [PATCH] [TEMPORARY] net: netfilter: IPV6 XT sockets need CONFIG_NF_DEFRAG_IPV6
  2015-01-29 16:50   ` Arnd Bergmann
@ 2015-01-29 21:57     ` Arnd Bergmann
  -1 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-01-29 21:57 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: netdev, davem, KOVACS Krisztian

On Thursday 29 January 2015 17:50:30 Arnd Bergmann wrote:
> On Thursday 29 January 2015 17:18:59 Arnd Bergmann wrote:
> > If IP6_NF_IPTABLES=m, NF_DEFRAG_IPV6 gets selected as a module as well
> > from NETFILTER_XT_MATCH_SOCKET, so the latter cannot be built-in, or
> > we get:
> 
> I messed up the subject line, the [TEMPORARY] was not meant to be
> in there, and I also saw that the subject was mixed up too.
> 
> I will send it again with the proper subject.

After trying to fix up the commit message, I'm no longer sure the
patch was right either. The patch below is what I have now, and it
fixes the broken randconfig, but I'd give it a few hundred more
builds and some thought before I'm actually convinced that it's complete.

Sorry about the messup.

	Arnd

8<-----
>From 6da20879baa5b562c023f1a1b81a0a48da5ab0e4 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 6 Jun 2014 10:07:46 +0200
Subject: [PATCH] [SUBMITTED] net: netfilter: fix IPV6 XT sockets dependency

If IP6_NF_IPTABLES=m, and one of NETFILTER_XT_MATCH_SOCKET or
NETFILTER_XT_TARGET_TPROXY is built-in, we get a link error:

net/built-in.o: In function `socket_mt_init':
:(.init.text+0x32a0): undefined reference to `nf_defrag_ipv6_enable'
net/built-in.o: In function `tproxy_tg_init':
xt_TPROXY.c:582: undefined reference to `nf_defrag_ipv6_enable'

The reason for this is that NF_DEFRAG_IPV6 also gets selected
by NF_CONNTRACK_IPV6, and that forces it to be a module.

To solve this, we add another set of dependencies that enforce that
either IP6_NF_IPTABLES is disabled, or the two netfilter drivers
are also loadable modules.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index b02660fa9eb0..fc4f4a207785 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -875,6 +875,7 @@ config NETFILTER_XT_TARGET_TPROXY
 	depends on NETFILTER_ADVANCED
 	depends on (IPV6 || IPV6=n)
 	depends on IP_NF_MANGLE
+	depends on !NF_CONNTRACK_IPV6 || NF_CONNTRACK_IPV6
 	select NF_DEFRAG_IPV4
 	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES
 	help
@@ -1366,6 +1367,7 @@ config NETFILTER_XT_MATCH_SOCKET
 	depends on NETFILTER_XTABLES
 	depends on NETFILTER_ADVANCED
 	depends on !NF_CONNTRACK || NF_CONNTRACK
+	depends on !NF_CONNTRACK_IPV6 || NF_CONNTRACK_IPV6
 	depends on (IPV6 || IPV6=n)
 	select NF_DEFRAG_IPV4
 	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES

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

* [PATCH] [TEMPORARY] net: netfilter: IPV6 XT sockets need CONFIG_NF_DEFRAG_IPV6
@ 2015-01-29 21:57     ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-01-29 21:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 29 January 2015 17:50:30 Arnd Bergmann wrote:
> On Thursday 29 January 2015 17:18:59 Arnd Bergmann wrote:
> > If IP6_NF_IPTABLES=m, NF_DEFRAG_IPV6 gets selected as a module as well
> > from NETFILTER_XT_MATCH_SOCKET, so the latter cannot be built-in, or
> > we get:
> 
> I messed up the subject line, the [TEMPORARY] was not meant to be
> in there, and I also saw that the subject was mixed up too.
> 
> I will send it again with the proper subject.

After trying to fix up the commit message, I'm no longer sure the
patch was right either. The patch below is what I have now, and it
fixes the broken randconfig, but I'd give it a few hundred more
builds and some thought before I'm actually convinced that it's complete.

Sorry about the messup.

	Arnd

8<-----
>From 6da20879baa5b562c023f1a1b81a0a48da5ab0e4 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 6 Jun 2014 10:07:46 +0200
Subject: [PATCH] [SUBMITTED] net: netfilter: fix IPV6 XT sockets dependency

If IP6_NF_IPTABLES=m, and one of NETFILTER_XT_MATCH_SOCKET or
NETFILTER_XT_TARGET_TPROXY is built-in, we get a link error:

net/built-in.o: In function `socket_mt_init':
:(.init.text+0x32a0): undefined reference to `nf_defrag_ipv6_enable'
net/built-in.o: In function `tproxy_tg_init':
xt_TPROXY.c:582: undefined reference to `nf_defrag_ipv6_enable'

The reason for this is that NF_DEFRAG_IPV6 also gets selected
by NF_CONNTRACK_IPV6, and that forces it to be a module.

To solve this, we add another set of dependencies that enforce that
either IP6_NF_IPTABLES is disabled, or the two netfilter drivers
are also loadable modules.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index b02660fa9eb0..fc4f4a207785 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -875,6 +875,7 @@ config NETFILTER_XT_TARGET_TPROXY
 	depends on NETFILTER_ADVANCED
 	depends on (IPV6 || IPV6=n)
 	depends on IP_NF_MANGLE
+	depends on !NF_CONNTRACK_IPV6 || NF_CONNTRACK_IPV6
 	select NF_DEFRAG_IPV4
 	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES
 	help
@@ -1366,6 +1367,7 @@ config NETFILTER_XT_MATCH_SOCKET
 	depends on NETFILTER_XTABLES
 	depends on NETFILTER_ADVANCED
 	depends on !NF_CONNTRACK || NF_CONNTRACK
+	depends on !NF_CONNTRACK_IPV6 || NF_CONNTRACK_IPV6
 	depends on (IPV6 || IPV6=n)
 	select NF_DEFRAG_IPV4
 	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES

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

end of thread, other threads:[~2015-01-29 21:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 16:18 [PATCH] [TEMPORARY] net: netfilter: IPV6 XT sockets need CONFIG_NF_DEFRAG_IPV6 Arnd Bergmann
2015-01-29 16:18 ` Arnd Bergmann
2015-01-29 16:50 ` Arnd Bergmann
2015-01-29 16:50   ` Arnd Bergmann
2015-01-29 21:57   ` Arnd Bergmann
2015-01-29 21:57     ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.