[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190216223358.30711-1-bp@alien8.de>
Date: Sat, 16 Feb 2019 23:33:58 +0100
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Andrea Claudi <aclaudi@...hat.com>, coreteam@...filter.org,
Florian Westphal <fw@...len.de>,
Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
Julian Anastasov <ja@....bg>, Li Shuang <shuali@...hat.com>,
netfilter-devel@...r.kernel.org,
Pablo Neira Ayuso <pablo@...filter.org>,
Simon Horman <horms@...ge.net.au>
Subject: [PATCH] netfilter/ipvs: Fix unused variable warning
From: Borislav Petkov <bp@...e.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@...hat.com>
Cc: coreteam@...filter.org
Cc: Florian Westphal <fw@...len.de>
Cc: Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>
Cc: Julian Anastasov <ja@....bg>
Cc: Li Shuang <shuali@...hat.com>
Cc: netfilter-devel@...r.kernel.org
Cc: Pablo Neira Ayuso <pablo@...filter.org>
Cc: Simon Horman <horms@...ge.net.au>
Signed-off-by: Borislav Petkov <bp@...e.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
Powered by blists - more mailing lists