netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf v2] netfilter: nf_conntrack_h323: Remove deprecated config check
@ 2019-05-03 18:39 Subash Abhinov Kasiviswanathan
  2019-05-03 20:52 ` Florian Westphal
  2019-05-05 22:31 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Subash Abhinov Kasiviswanathan @ 2019-05-03 18:39 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.

v1->v2: Use nf_ip6_route6() instead of v6ops->route() and keep
the IS_MODULE() in nf_ipv6_ops as mentioned by Florian so that
direct calls are used when IPV6 is builtin and indirect calls
are used only when IPV6 is a module.

Fixes: a0ae2562c6c4b2 ("netfilter: conntrack: remove l3proto abstraction")
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
---
 net/netfilter/nf_conntrack_h323_main.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index 005589c..12de403 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -748,24 +748,19 @@ 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;
 		struct flowi6 fl1, fl2;
 
-		v6ops = nf_get_ipv6_ops();
-		if (!v6ops)
-			return 0;
-
 		memset(&fl1, 0, sizeof(fl1));
 		fl1.daddr = src->in6;
 
 		memset(&fl2, 0, sizeof(fl2));
 		fl2.daddr = dst->in6;
-		if (!v6ops->route(net, (struct dst_entry **)&rt1,
+		if (!nf_ip6_route(net, (struct dst_entry **)&rt1,
 				  flowi6_to_flowi(&fl1), false)) {
-			if (!v6ops->route(net, (struct dst_entry **)&rt2,
+			if (!nf_ip6_route(net, (struct dst_entry **)&rt2,
 					  flowi6_to_flowi(&fl2), false)) {
 				if (ipv6_addr_equal(rt6_nexthop(rt1, &fl1.daddr),
 						    rt6_nexthop(rt2, &fl2.daddr)) &&
-- 
1.9.1


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

* Re: [PATCH nf v2] netfilter: nf_conntrack_h323: Remove deprecated config check
  2019-05-03 18:39 [PATCH nf v2] netfilter: nf_conntrack_h323: Remove deprecated config check Subash Abhinov Kasiviswanathan
@ 2019-05-03 20:52 ` Florian Westphal
  2019-05-05 22:31 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2019-05-03 20:52 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.
> 
> v1->v2: Use nf_ip6_route6() instead of v6ops->route() and keep
> the IS_MODULE() in nf_ipv6_ops as mentioned by Florian so that
> direct calls are used when IPV6 is builtin and indirect calls
> are used only when IPV6 is a module.
> 
> Fixes: a0ae2562c6c4b2 ("netfilter: conntrack: remove l3proto abstraction")
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Reviewed-by: Florian Westphal <fw@strlen.de>

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

* Re: [PATCH nf v2] netfilter: nf_conntrack_h323: Remove deprecated config check
  2019-05-03 18:39 [PATCH nf v2] netfilter: nf_conntrack_h323: Remove deprecated config check Subash Abhinov Kasiviswanathan
  2019-05-03 20:52 ` Florian Westphal
@ 2019-05-05 22:31 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2019-05-05 22:31 UTC (permalink / raw)
  To: Subash Abhinov Kasiviswanathan; +Cc: fw, netfilter-devel

On Fri, May 03, 2019 at 12:39:08PM -0600, Subash Abhinov Kasiviswanathan wrote:
> CONFIG_NF_CONNTRACK_IPV6 has been deprecated so replace it with
> a check for IPV6 instead.
> 
> v1->v2: Use nf_ip6_route6() instead of v6ops->route() and keep
> the IS_MODULE() in nf_ipv6_ops as mentioned by Florian so that
> direct calls are used when IPV6 is builtin and indirect calls
> are used only when IPV6 is a module.

Applied, thanks.

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

end of thread, other threads:[~2019-05-05 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-03 18:39 [PATCH nf v2] netfilter: nf_conntrack_h323: Remove deprecated config check Subash Abhinov Kasiviswanathan
2019-05-03 20:52 ` Florian Westphal
2019-05-05 22:31 ` Pablo Neira Ayuso

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).