Patch "netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     netfilter-conntrack-define-variables-exp_nat_nla_pol.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 19383b7490254c639e9844a5a2cdca748aa99448
Author: Tom Rix <trix@xxxxxxxxxx>
Date:   Sun May 14 10:00:10 2023 -0400

    netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT
    
    [ Upstream commit 224a876e37543eee111bf9b6aa4935080e619335 ]
    
    gcc with W=1 and ! CONFIG_NF_NAT
    net/netfilter/nf_conntrack_netlink.c:3463:32: error:
      ‘exp_nat_nla_policy’ defined but not used [-Werror=unused-const-variable=]
     3463 | static const struct nla_policy exp_nat_nla_policy[CTA_EXPECT_NAT_MAX+1] = {
          |                                ^~~~~~~~~~~~~~~~~~
    net/netfilter/nf_conntrack_netlink.c:2979:33: error:
      ‘any_addr’ defined but not used [-Werror=unused-const-variable=]
     2979 | static const union nf_inet_addr any_addr;
          |                                 ^~~~~~~~
    
    These variables use is controlled by CONFIG_NF_NAT, so should their definitions.
    
    Signed-off-by: Tom Rix <trix@xxxxxxxxxx>
    Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 6d9884332db74..b710889a90f6f 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -2681,7 +2681,9 @@ static int ctnetlink_exp_dump_mask(struct sk_buff *skb,
 	return -1;
 }
 
+#if IS_ENABLED(CONFIG_NF_NAT)
 static const union nf_inet_addr any_addr;
+#endif
 
 static __be32 nf_expect_get_id(const struct nf_conntrack_expect *exp)
 {
@@ -3181,10 +3183,12 @@ ctnetlink_change_expect(struct nf_conntrack_expect *x,
 	return 0;
 }
 
+#if IS_ENABLED(CONFIG_NF_NAT)
 static const struct nla_policy exp_nat_nla_policy[CTA_EXPECT_NAT_MAX+1] = {
 	[CTA_EXPECT_NAT_DIR]	= { .type = NLA_U32 },
 	[CTA_EXPECT_NAT_TUPLE]	= { .type = NLA_NESTED },
 };
+#endif
 
 static int
 ctnetlink_parse_expect_nat(const struct nlattr *attr,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux