diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2019-10-15 10:27:51 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-10-18 10:55:47 -0700 |
commit | 0b26ee1b475b5395a7a3fe79defeb4928d1e5a6f (patch) | |
tree | a1ef93ad63ad46ad1da9899cfa278f001d9dbc36 /datapath | |
parent | 5a6069e3f4621d8228edcbacf8c0a6b82546c60b (diff) | |
download | openvswitch-0b26ee1b475b5395a7a3fe79defeb4928d1e5a6f.tar.gz |
datapath: Replace removed NF_NAT_NEEDED with IS_ENABLED(CONFIG_NF_NAT)
Backports the following upstream commit with some backward compatibility
change.
commit f319ca6557c10a711facc4dd60197470796d3ec1
Author: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Wed May 8 08:52:32 2019 +0200
openvswitch: Replace removed NF_NAT_NEEDED with IS_ENABLED(CONFIG_NF_NAT)
Commit 4806e975729f99c7 ("netfilter: replace NF_NAT_NEEDED with
IS_ENABLED(CONFIG_NF_NAT)") removed CONFIG_NF_NAT_NEEDED, but a new user
popped up afterwards.
Fixes: fec9c271b8f1bde1 ("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>
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/conntrack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/datapath/conntrack.c b/datapath/conntrack.c index 86e7dd24b..ba73962b2 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -1406,7 +1406,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_NEEDED) if (info->nat) { ret = nf_nat_helper_try_module_get(name, info->family, key->ip.proto); @@ -1909,7 +1909,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_NEEDED) if (ct_info->nat) nf_nat_helper_put(ct_info->helper); #endif |