From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Tom Rix <trix@redhat.com>,
Simon Horman <simon.horman@corigine.com>,
Florian Westphal <fw@strlen.de>, Sasha Levin <sashal@kernel.org>,
pablo@netfilter.org, kadlec@netfilter.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 24/27] netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT
Date: Thu, 25 May 2023 14:42:33 -0400 [thread overview]
Message-ID: <20230525184238.1943072-24-sashal@kernel.org> (raw)
In-Reply-To: <20230525184238.1943072-1-sashal@kernel.org>
From: Tom Rix <trix@redhat.com>
[ 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@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/netfilter/nf_conntrack_netlink.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 4747daf901e71..c1c24b5a43bc4 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -2712,7 +2712,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)
{
@@ -3212,10 +3214,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,
--
2.39.2
next prev parent reply other threads:[~2023-05-25 18:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 18:42 [PATCH AUTOSEL 5.4 01/27] ASoC: dwc: limit the number of overrun messages Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 02/27] xfrm: Check if_id in inbound policy/secpath match Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 03/27] ASoC: ssm2602: Add workaround for playback distortions Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 04/27] media: dvb_demux: fix a bug for the continuity counter Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 05/27] media: dvb-usb: az6027: fix three null-ptr-deref in az6027_i2c_xfer() Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 06/27] media: dvb-usb-v2: ec168: fix null-ptr-deref in ec168_i2c_xfer() Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 07/27] media: dvb-usb-v2: ce6230: fix null-ptr-deref in ce6230_i2c_master_xfer() Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 08/27] media: dvb-usb-v2: rtl28xxu: fix null-ptr-deref in rtl28xxu_i2c_xfer Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 09/27] media: dvb-usb: digitv: fix null-ptr-deref in digitv_i2c_xfer() Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 10/27] media: dvb-usb: dw2102: fix uninit-value in su3000_read_mac_address Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 11/27] media: netup_unidvb: fix irq init by register it at the end of probe Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 12/27] media: dvb_ca_en50221: fix a size write bug Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 13/27] media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb() Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 14/27] media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 15/27] media: dvb-core: Fix use-after-free due on race condition at dvb_net Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 16/27] media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*() Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 17/27] media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221 Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 18/27] wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 19/27] ARM: dts: stm32: add pin map for CAN controller on stm32f7 Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 20/27] ARM: dts: stm32: add CAN support on stm32f746 Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 21/27] arm64/mm: mark private VM_FAULT_X defines as vm_fault_t Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 22/27] scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 23/27] wifi: b43: fix incorrect __packed annotation Sasha Levin
2023-05-25 18:42 ` Sasha Levin [this message]
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 25/27] ALSA: oss: avoid missing-prototype warnings Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 26/27] atm: hide unused procfs functions Sasha Levin
2023-05-25 18:42 ` [PATCH AUTOSEL 5.4 27/27] mdio_bus: unhide mdio_bus_init prototype Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230525184238.1943072-24-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=simon.horman@corigine.com \
--cc=stable@vger.kernel.org \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox