* [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy
@ 2018-06-05 11:40 Arnd Bergmann
2018-06-05 12:13 ` Paolo Abeni
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2018-06-05 11:40 UTC (permalink / raw)
To: Pablo Neira Ayuso, David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI
Cc: Máté Eckl, Arnd Bergmann, Paolo Abeni,
Willem de Bruijn, Eric Dumazet, David Ahern, Martin KaFai Lau,
netdev, linux-kernel
It is now possible to enable the libified nf_tproxy modules without
also enabling NETFILTER_XT_TARGET_TPROXY, which throws off the
ifdef logic in the udp core code:
net/ipv6/netfilter/nf_tproxy_ipv6.o: In function `nf_tproxy_get_sock_v6':
nf_tproxy_ipv6.c:(.text+0x1a8): undefined reference to `udp6_lib_lookup'
net/ipv4/netfilter/nf_tproxy_ipv4.o: In function `nf_tproxy_get_sock_v4':
nf_tproxy_ipv4.c:(.text+0x3d0): undefined reference to `udp4_lib_lookup'
We can actually simplify the conditions now to provide the two functions
exactly when they are needed.
Fixes: 45ca4e0cf273 ("netfilter: Libify xt_TPROXY")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
net/ipv4/udp.c | 4 +---
net/ipv6/udp.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 4f16e5d71875..3365362cac88 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -544,9 +544,7 @@ EXPORT_SYMBOL_GPL(udp4_lib_lookup_skb);
/* Must be called under rcu_read_lock().
* Does increment socket refcount.
*/
-#if IS_ENABLED(CONFIG_NETFILTER_XT_MATCH_SOCKET) || \
- IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TPROXY) || \
- IS_ENABLED(CONFIG_NF_SOCKET_IPV4)
+#if IS_ENABLED(CONFIG_NF_TPROXY_IPV4) || IS_ENABLED(CONFIG_NF_SOCKET_IPV4)
struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
__be32 daddr, __be16 dport, int dif)
{
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 967acff95bbe..164afd31aebf 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -285,9 +285,7 @@ EXPORT_SYMBOL_GPL(udp6_lib_lookup_skb);
/* Must be called under rcu_read_lock().
* Does increment socket refcount.
*/
-#if IS_ENABLED(CONFIG_NETFILTER_XT_MATCH_SOCKET) || \
- IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TPROXY) || \
- IS_ENABLED(CONFIG_NF_SOCKET_IPV6)
+#if IS_ENABLED(CONFIG_NF_TPROXY_IPV6) || IS_ENABLED(CONFIG_NF_SOCKET_IPV6)
struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, __be16 dport, int dif)
{
--
2.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy
2018-06-05 11:40 [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy Arnd Bergmann
@ 2018-06-05 12:13 ` Paolo Abeni
2018-06-05 14:42 ` Eckl, Máté
2018-06-05 14:54 ` David Miller
2 siblings, 0 replies; 7+ messages in thread
From: Paolo Abeni @ 2018-06-05 12:13 UTC (permalink / raw)
To: Arnd Bergmann, Pablo Neira Ayuso, David S. Miller,
Alexey Kuznetsov, Hideaki YOSHIFUJI
Cc: Máté Eckl, Willem de Bruijn, Eric Dumazet, David Ahern,
Martin KaFai Lau, netdev, linux-kernel
On Tue, 2018-06-05 at 13:40 +0200, Arnd Bergmann wrote:
> It is now possible to enable the libified nf_tproxy modules without
> also enabling NETFILTER_XT_TARGET_TPROXY, which throws off the
> ifdef logic in the udp core code:
>
> net/ipv6/netfilter/nf_tproxy_ipv6.o: In function `nf_tproxy_get_sock_v6':
> nf_tproxy_ipv6.c:(.text+0x1a8): undefined reference to `udp6_lib_lookup'
> net/ipv4/netfilter/nf_tproxy_ipv4.o: In function `nf_tproxy_get_sock_v4':
> nf_tproxy_ipv4.c:(.text+0x3d0): undefined reference to `udp4_lib_lookup'
>
> We can actually simplify the conditions now to provide the two functions
> exactly when they are needed.
>
> Fixes: 45ca4e0cf273 ("netfilter: Libify xt_TPROXY")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> net/ipv4/udp.c | 4 +---
> net/ipv6/udp.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> index 4f16e5d71875..3365362cac88 100644
> --- a/net/ipv4/udp.c
> +++ b/net/ipv4/udp.c
> @@ -544,9 +544,7 @@ EXPORT_SYMBOL_GPL(udp4_lib_lookup_skb);
> /* Must be called under rcu_read_lock().
> * Does increment socket refcount.
> */
> -#if IS_ENABLED(CONFIG_NETFILTER_XT_MATCH_SOCKET) || \
> - IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TPROXY) || \
> - IS_ENABLED(CONFIG_NF_SOCKET_IPV4)
> +#if IS_ENABLED(CONFIG_NF_TPROXY_IPV4) || IS_ENABLED(CONFIG_NF_SOCKET_IPV4)
> struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
> __be32 daddr, __be16 dport, int dif)
> {
> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> index 967acff95bbe..164afd31aebf 100644
> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
> @@ -285,9 +285,7 @@ EXPORT_SYMBOL_GPL(udp6_lib_lookup_skb);
> /* Must be called under rcu_read_lock().
> * Does increment socket refcount.
> */
> -#if IS_ENABLED(CONFIG_NETFILTER_XT_MATCH_SOCKET) || \
> - IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TPROXY) || \
> - IS_ENABLED(CONFIG_NF_SOCKET_IPV6)
> +#if IS_ENABLED(CONFIG_NF_TPROXY_IPV6) || IS_ENABLED(CONFIG_NF_SOCKET_IPV6)
> struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport,
> const struct in6_addr *daddr, __be16 dport, int dif)
> {
LGTM,
Acked-by: Paolo Abeni <pabeni@redhat.com>
Thanks,
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy
2018-06-05 11:40 [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy Arnd Bergmann
2018-06-05 12:13 ` Paolo Abeni
@ 2018-06-05 14:42 ` Eckl, Máté
2018-06-05 14:54 ` David Miller
2 siblings, 0 replies; 7+ messages in thread
From: Eckl, Máté @ 2018-06-05 14:42 UTC (permalink / raw)
To: arnd
Cc: pablo, davem, kuznet, yoshfuji, pabeni, willemb, edumazet,
dsahern, kafai, netdev, linux-kernel
Arnd Bergmann <arnd@arndb.de> ezt írta (időpont: 2018. jún. 5., K, 13:41):
>
> It is now possible to enable the libified nf_tproxy modules without
> also enabling NETFILTER_XT_TARGET_TPROXY, which throws off the
> ifdef logic in the udp core code:
>
> net/ipv6/netfilter/nf_tproxy_ipv6.o: In function `nf_tproxy_get_sock_v6':
> nf_tproxy_ipv6.c:(.text+0x1a8): undefined reference to `udp6_lib_lookup'
> net/ipv4/netfilter/nf_tproxy_ipv4.o: In function `nf_tproxy_get_sock_v4':
> nf_tproxy_ipv4.c:(.text+0x3d0): undefined reference to `udp4_lib_lookup'
>
> We can actually simplify the conditions now to provide the two functions
> exactly when they are needed.
>
> Fixes: 45ca4e0cf273 ("netfilter: Libify xt_TPROXY")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Máté Eckl <ecklm94@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy
2018-06-05 11:40 [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy Arnd Bergmann
2018-06-05 12:13 ` Paolo Abeni
2018-06-05 14:42 ` Eckl, Máté
@ 2018-06-05 14:54 ` David Miller
2018-06-05 15:12 ` Pablo Neira Ayuso
2018-06-06 13:33 ` Pablo Neira Ayuso
2 siblings, 2 replies; 7+ messages in thread
From: David Miller @ 2018-06-05 14:54 UTC (permalink / raw)
To: arnd
Cc: pablo, kuznet, yoshfuji, ecklm94, pabeni, willemb, edumazet,
dsahern, kafai, netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 5 Jun 2018 13:40:34 +0200
> It is now possible to enable the libified nf_tproxy modules without
> also enabling NETFILTER_XT_TARGET_TPROXY, which throws off the
> ifdef logic in the udp core code:
>
> net/ipv6/netfilter/nf_tproxy_ipv6.o: In function `nf_tproxy_get_sock_v6':
> nf_tproxy_ipv6.c:(.text+0x1a8): undefined reference to `udp6_lib_lookup'
> net/ipv4/netfilter/nf_tproxy_ipv4.o: In function `nf_tproxy_get_sock_v4':
> nf_tproxy_ipv4.c:(.text+0x3d0): undefined reference to `udp4_lib_lookup'
>
> We can actually simplify the conditions now to provide the two functions
> exactly when they are needed.
>
> Fixes: 45ca4e0cf273 ("netfilter: Libify xt_TPROXY")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Pablo, I'm going to apply this directly to fix the link failure.
Thanks Arnd.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy
2018-06-05 14:54 ` David Miller
@ 2018-06-05 15:12 ` Pablo Neira Ayuso
2018-06-06 13:33 ` Pablo Neira Ayuso
1 sibling, 0 replies; 7+ messages in thread
From: Pablo Neira Ayuso @ 2018-06-05 15:12 UTC (permalink / raw)
To: David Miller
Cc: arnd, kuznet, yoshfuji, ecklm94, pabeni, willemb, edumazet,
dsahern, kafai, netdev, linux-kernel
On Tue, Jun 05, 2018 at 10:54:53AM -0400, David Miller wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Tue, 5 Jun 2018 13:40:34 +0200
>
> > It is now possible to enable the libified nf_tproxy modules without
> > also enabling NETFILTER_XT_TARGET_TPROXY, which throws off the
> > ifdef logic in the udp core code:
> >
> > net/ipv6/netfilter/nf_tproxy_ipv6.o: In function `nf_tproxy_get_sock_v6':
> > nf_tproxy_ipv6.c:(.text+0x1a8): undefined reference to `udp6_lib_lookup'
> > net/ipv4/netfilter/nf_tproxy_ipv4.o: In function `nf_tproxy_get_sock_v4':
> > nf_tproxy_ipv4.c:(.text+0x3d0): undefined reference to `udp4_lib_lookup'
> >
> > We can actually simplify the conditions now to provide the two functions
> > exactly when they are needed.
> >
> > Fixes: 45ca4e0cf273 ("netfilter: Libify xt_TPROXY")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Pablo, I'm going to apply this directly to fix the link failure.
>
> Thanks Arnd.
Thanks David.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy
2018-06-05 14:54 ` David Miller
2018-06-05 15:12 ` Pablo Neira Ayuso
@ 2018-06-06 13:33 ` Pablo Neira Ayuso
2018-06-07 20:14 ` David Miller
1 sibling, 1 reply; 7+ messages in thread
From: Pablo Neira Ayuso @ 2018-06-06 13:33 UTC (permalink / raw)
To: David Miller
Cc: arnd, kuznet, yoshfuji, ecklm94, pabeni, willemb, edumazet,
dsahern, kafai, netdev, linux-kernel
On Tue, Jun 05, 2018 at 10:54:53AM -0400, David Miller wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Tue, 5 Jun 2018 13:40:34 +0200
>
> > It is now possible to enable the libified nf_tproxy modules without
> > also enabling NETFILTER_XT_TARGET_TPROXY, which throws off the
> > ifdef logic in the udp core code:
> >
> > net/ipv6/netfilter/nf_tproxy_ipv6.o: In function `nf_tproxy_get_sock_v6':
> > nf_tproxy_ipv6.c:(.text+0x1a8): undefined reference to `udp6_lib_lookup'
> > net/ipv4/netfilter/nf_tproxy_ipv4.o: In function `nf_tproxy_get_sock_v4':
> > nf_tproxy_ipv4.c:(.text+0x3d0): undefined reference to `udp4_lib_lookup'
> >
> > We can actually simplify the conditions now to provide the two functions
> > exactly when they are needed.
> >
> > Fixes: 45ca4e0cf273 ("netfilter: Libify xt_TPROXY")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Pablo, I'm going to apply this directly to fix the link failure.
BTW, could you also pick this fix for net-next?
http://patchwork.ozlabs.org/patch/924706/
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy
2018-06-06 13:33 ` Pablo Neira Ayuso
@ 2018-06-07 20:14 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2018-06-07 20:14 UTC (permalink / raw)
To: pablo
Cc: arnd, kuznet, yoshfuji, ecklm94, pabeni, willemb, edumazet,
dsahern, kafai, netdev, linux-kernel
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Wed, 6 Jun 2018 15:33:24 +0200
> BTW, could you also pick this fix for net-next?
>
> http://patchwork.ozlabs.org/patch/924706/
Sorry, I just noticed this now.
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-06-07 20:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-05 11:40 [PATCH] netfilter: provide udp*_lib_lookup for nf_tproxy Arnd Bergmann
2018-06-05 12:13 ` Paolo Abeni
2018-06-05 14:42 ` Eckl, Máté
2018-06-05 14:54 ` David Miller
2018-06-05 15:12 ` Pablo Neira Ayuso
2018-06-06 13:33 ` Pablo Neira Ayuso
2018-06-07 20:14 ` David Miller
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).