From: Borislav Petkov <[email protected]>
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 <[email protected]>
Cc: [email protected]
Cc: Florian Westphal <[email protected]>
Cc: Jozsef Kadlecsik <[email protected]>
Cc: Julian Anastasov <[email protected]>
Cc: Li Shuang <[email protected]>
Cc: [email protected]
Cc: Pablo Neira Ayuso <[email protected]>
Cc: Simon Horman <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
---
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
On Sat, Feb 16, 2019 at 11:33:58PM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <[email protected]>
>
> 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