Message ID | 1571074671-31834-10-git-send-email-yihung.wei@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | Backport upstream conntrack related patches | expand |
LGTM, thanks. Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com> On Mon, Oct 14, 2019 at 10:55 AM Yi-Hung Wei <yihung.wei@gmail.com> wrote: > > 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> > --- > datapath/conntrack.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/datapath/conntrack.c b/datapath/conntrack.c > index 86e7dd24bb9b..ba73962b2214 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 > -- > 2.7.4 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff --git a/datapath/conntrack.c b/datapath/conntrack.c index 86e7dd24bb9b..ba73962b2214 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