Skip to content

Commit

Permalink
openvswitch: Replace removed NF_NAT_NEEDED with IS_ENABLED(CONFIG_NF_…
Browse files Browse the repository at this point in the history
…NAT)

Commit 4806e97 ("netfilter: replace NF_NAT_NEEDED with
IS_ENABLED(CONFIG_NF_NAT)") removed CONFIG_NF_NAT_NEEDED, but a new user
popped up afterwards.

Fixes: fec9c27 ("openvswitch: load and reference the NAT helper.")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Florian Westphal <fw@strlen.de>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Geert Uytterhoeven authored and David S. Miller committed May 8, 2019
1 parent 19e4e76 commit f319ca6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/openvswitch/conntrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ static int ovs_ct_add_helper(struct ovs_conntrack_info *info, const char *name,
return -ENOMEM;
}

#ifdef CONFIG_NF_NAT_NEEDED
#if IS_ENABLED(CONFIG_NF_NAT)
if (info->nat) {
ret = nf_nat_helper_try_module_get(name, info->family,
key->ip.proto);
Expand Down Expand Up @@ -1811,7 +1811,7 @@ void ovs_ct_free_action(const struct nlattr *a)
static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info)
{
if (ct_info->helper) {
#ifdef CONFIG_NF_NAT_NEEDED
#if IS_ENABLED(CONFIG_NF_NAT)
if (ct_info->nat)
nf_nat_helper_put(ct_info->helper);
#endif
Expand Down

0 comments on commit f319ca6

Please sign in to comment.