All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf] netfilter: nf_conntrack_h323: Remove deprecated config check
@ 2019-05-03  3:22 Subash Abhinov Kasiviswanathan
  2019-05-03 10:19 ` Florian Westphal
  0 siblings, 1 reply; 3+ messages in thread
From: Subash Abhinov Kasiviswanathan @ 2019-05-03  3:22 UTC (permalink / raw)
  To: fw, pablo, netfilter-devel; +Cc: Subash Abhinov Kasiviswanathan

CONFIG_NF_CONNTRACK_IPV6 has been deprecated so replace it with
a check for IPV6 instead.

Fixes: a0ae2562c6c4b2 ("netfilter: conntrack: remove l3proto abstraction")
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
---
 include/linux/netfilter_ipv6.h         | 2 +-
 net/netfilter/nf_conntrack_h323_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
index 12113e5..61f7ac9 100644
--- a/include/linux/netfilter_ipv6.h
+++ b/include/linux/netfilter_ipv6.h
@@ -25,7 +25,7 @@ struct ip6_rt_info {
  * if IPv6 is a module.
  */
 struct nf_ipv6_ops {
-#if IS_MODULE(CONFIG_IPV6)
+#if IS_ENABLED(CONFIG_IPV6)
 	int (*chk_addr)(struct net *net, const struct in6_addr *addr,
 			const struct net_device *dev, int strict);
 	int (*route_me_harder)(struct net *net, struct sk_buff *skb);
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index 005589c..1c6769b 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -748,7 +748,7 @@ static int callforward_do_filter(struct net *net,
 		}
 		break;
 	}
-#if IS_ENABLED(CONFIG_NF_CONNTRACK_IPV6)
+#if IS_ENABLED(CONFIG_IPV6)
 	case AF_INET6: {
 		const struct nf_ipv6_ops *v6ops;
 		struct rt6_info *rt1, *rt2;
-- 
1.9.1


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

* Re: [PATCH nf] netfilter: nf_conntrack_h323: Remove deprecated config check
  2019-05-03  3:22 [PATCH nf] netfilter: nf_conntrack_h323: Remove deprecated config check Subash Abhinov Kasiviswanathan
@ 2019-05-03 10:19 ` Florian Westphal
  2019-05-03 10:30   ` Florian Westphal
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2019-05-03 10:19 UTC (permalink / raw)
  To: Subash Abhinov Kasiviswanathan; +Cc: fw, pablo, netfilter-devel

Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> wrote:
> CONFIG_NF_CONNTRACK_IPV6 has been deprecated so replace it with
> a check for IPV6 instead.

Right, I missed this part somehow.

> Fixes: a0ae2562c6c4b2 ("netfilter: conntrack: remove l3proto abstraction")
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
> ---
>  include/linux/netfilter_ipv6.h         | 2 +-
>  net/netfilter/nf_conntrack_h323_main.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
> index 12113e5..61f7ac9 100644
> --- a/include/linux/netfilter_ipv6.h
> +++ b/include/linux/netfilter_ipv6.h
> @@ -25,7 +25,7 @@ struct ip6_rt_info {
>   * if IPv6 is a module.
>   */
>  struct nf_ipv6_ops {
> -#if IS_MODULE(CONFIG_IPV6)
> +#if IS_ENABLED(CONFIG_IPV6)

I would prefer if we could keep this as IS_ENABLED().

> diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
> index 005589c..1c6769b 100644
> --- a/net/netfilter/nf_conntrack_h323_main.c
> +++ b/net/netfilter/nf_conntrack_h323_main.c
> @@ -748,7 +748,7 @@ static int callforward_do_filter(struct net *net,
>  		}
>  		break;
>  	}
> -#if IS_ENABLED(CONFIG_NF_CONNTRACK_IPV6)
> +#if IS_ENABLED(CONFIG_IPV6)
>  	case AF_INET6: {
>  		const struct nf_ipv6_ops *v6ops;
>  		struct rt6_info *rt1, *rt2;

This branch should use nf_ip6_route() instead of v6ops->route().

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

* Re: [PATCH nf] netfilter: nf_conntrack_h323: Remove deprecated config check
  2019-05-03 10:19 ` Florian Westphal
@ 2019-05-03 10:30   ` Florian Westphal
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2019-05-03 10:30 UTC (permalink / raw)
  To: Florian Westphal; +Cc: Subash Abhinov Kasiviswanathan, pablo, netfilter-devel

Florian Westphal <fw@strlen.de> wrote:
> Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> wrote:
> > CONFIG_NF_CONNTRACK_IPV6 has been deprecated so replace it with
> > a check for IPV6 instead.
> 
> Right, I missed this part somehow.
> 
> > Fixes: a0ae2562c6c4b2 ("netfilter: conntrack: remove l3proto abstraction")
> > Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
> > ---
> >  include/linux/netfilter_ipv6.h         | 2 +-
> >  net/netfilter/nf_conntrack_h323_main.c | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
> > index 12113e5..61f7ac9 100644
> > --- a/include/linux/netfilter_ipv6.h
> > +++ b/include/linux/netfilter_ipv6.h
> > @@ -25,7 +25,7 @@ struct ip6_rt_info {
> >   * if IPv6 is a module.
> >   */
> >  struct nf_ipv6_ops {
> > -#if IS_MODULE(CONFIG_IPV6)
> > +#if IS_ENABLED(CONFIG_IPV6)
> 
> I would prefer if we could keep this as IS_ENABLED().

Sigh, I meant 'keep IS_MODULE()'.

The callbacks protected by IS_MODULE(IPV6) are not needed when
ipv6 is builtin because the functions they would point to
can be called directly instead.

We provide wrappers to encap the 'direct or indirect call'
decision, e.g. nf_ip6_route() will use the indirection only
when ipv6 is a module.

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

end of thread, other threads:[~2019-05-03 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-03  3:22 [PATCH nf] netfilter: nf_conntrack_h323: Remove deprecated config check Subash Abhinov Kasiviswanathan
2019-05-03 10:19 ` Florian Westphal
2019-05-03 10:30   ` Florian Westphal

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.