* [PATCH] netfilter/ipvs: Fix unused variable warning
@ 2019-02-16 22:33 Borislav Petkov
2019-02-17 12:51 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2019-02-16 22:33 UTC (permalink / raw)
To: LKML
Cc: Andrea Claudi, coreteam, Florian Westphal, Jozsef Kadlecsik,
Julian Anastasov, Li Shuang, netfilter-devel, Pablo Neira Ayuso,
Simon Horman
From: Borislav Petkov <bp@suse.de>
Move the local variable 'ret' into the IP_VS_IPV6 ifdef so that the
unused variable warning doesn't fire for randconfig builds with
CONFIG_IP_VS_IPV6 disabled.
Fixes: 098e13f5b21d ("ipvs: fix dependency on nf_defrag_ipv6")
Cc: Andrea Claudi <aclaudi@redhat.com>
Cc: coreteam@netfilter.org
Cc: Florian Westphal <fw@strlen.de>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: Julian Anastasov <ja@ssi.bg>
Cc: Li Shuang <shuali@redhat.com>
Cc: netfilter-devel@vger.kernel.org
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Simon Horman <horms@verge.net.au>
Signed-off-by: Borislav Petkov <bp@suse.de>
---
net/netfilter/ipvs/ip_vs_ctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 86afacb07e5f..ac8d848d7624 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -896,12 +896,13 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest,
{
struct ip_vs_dest *dest;
unsigned int atype, i;
- int ret = 0;
EnterFunction(2);
#ifdef CONFIG_IP_VS_IPV6
if (udest->af == AF_INET6) {
+ int ret;
+
atype = ipv6_addr_type(&udest->addr.in6);
if ((!(atype & IPV6_ADDR_UNICAST) ||
atype & IPV6_ADDR_LINKLOCAL) &&
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netfilter/ipvs: Fix unused variable warning
2019-02-16 22:33 [PATCH] netfilter/ipvs: Fix unused variable warning Borislav Petkov
@ 2019-02-17 12:51 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2019-02-17 12:51 UTC (permalink / raw)
To: Borislav Petkov
Cc: LKML, Andrea Claudi, coreteam, Florian Westphal, Jozsef Kadlecsik,
Julian Anastasov, Li Shuang, netfilter-devel, Simon Horman
On Sat, Feb 16, 2019 at 11:33:58PM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> Move the local variable 'ret' into the IP_VS_IPV6 ifdef so that the
> unused variable warning doesn't fire for randconfig builds with
> CONFIG_IP_VS_IPV6 disabled.
Thanks! We already have a patch for this, will pass it to David asap.
https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git/commit/?id=c93a49b9769e435990c82297aa0baa31e1538790
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-17 12:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-16 22:33 [PATCH] netfilter/ipvs: Fix unused variable warning Borislav Petkov
2019-02-17 12:51 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).