netfilter/ipvs: Fix unused variable warning
Subsystems (3)
PATCH 1/1 netfilter/ipvs: Fix unused variable warning
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 Florian Westphal <[email protected]>
Cc Jozsef Kadlecsik <[email protected]>
Cc Julian Anastasov <[email protected]>
Cc Li Shuang <[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(-)
net/netfilter/ipvs/ip_vs_ctl.c +2 -1
@@ -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) &&
Signature · 1 line
2.19.1
Pablo Neira Ayuso
maintainerQuoted 5 lines · Borislav Petkov
From: Borislav Petkov <[email protected]>
Move the local variable 'ret' into the
IP_VS_IPV6ifdef so that the unused variable warning doesn't fire for randconfig builds withCONFIG_IP_VS_IPV6disabled.
Thanks! We already have a patch for this, will pass it to David asap.