libcxgbi:cxgb4i Guard ipv6 code with a config check

Fixes: fc8d0590d9 ("libcxgbi: Add ipv6 api to driver")
Fixes: 759a0cc5a3 ("cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6
api")
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Anish Bhatt
2014-07-17 18:34:44 -07:00
committed by David S. Miller
parent da388973d4
commit e81fbf6cd6
2 changed files with 19 additions and 3 deletions

View File

@@ -602,6 +602,7 @@ err_out:
return ERR_PTR(err);
}
#if IS_ENABLED(CONFIG_IPV6)
static struct rt6_info *find_route_ipv6(const struct in6_addr *saddr,
const struct in6_addr *daddr)
{
@@ -716,6 +717,7 @@ rel_rt:
err_out:
return ERR_PTR(err);
}
#endif /* IS_ENABLED(CONFIG_IPV6) */
void cxgbi_sock_established(struct cxgbi_sock *csk, unsigned int snd_isn,
unsigned int opt)
@@ -2638,8 +2640,10 @@ struct iscsi_endpoint *cxgbi_ep_connect(struct Scsi_Host *shost,
if (dst_addr->sa_family == AF_INET) {
csk = cxgbi_check_route(dst_addr);
#if IS_ENABLED(CONFIG_IPV6)
} else if (dst_addr->sa_family == AF_INET6) {
csk = cxgbi_check_route6(dst_addr);
#endif
} else {
pr_info("address family 0x%x NOT supported.\n",
dst_addr->sa_family);