aboutsummaryrefslogtreecommitdiff
path: root/sys/ofed
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2012-03-16 17:56:53 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2012-03-16 17:56:53 +0000
commit57e58a39d602f037554024b519f6804f6d07be3d (patch)
tree09c2f3924dd70135ffc0b1bd8ca60c7ec8b8b6eb /sys/ofed
parent9fe1e2282eb05786e4f58ea9bd478b75f2755269 (diff)
downloadsrc-57e58a39d602f037554024b519f6804f6d07be3d.tar.gz
src-57e58a39d602f037554024b519f6804f6d07be3d.zip
Fix build with INET6 disabled.
Notes
Notes: svn path=/head/; revision=233040
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/drivers/infiniband/core/addr.c6
-rw-r--r--sys/ofed/drivers/infiniband/core/cma.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/sys/ofed/drivers/infiniband/core/addr.c b/sys/ofed/drivers/infiniband/core/addr.c
index cde40374759f..512aefaf91a3 100644
--- a/sys/ofed/drivers/infiniband/core/addr.c
+++ b/sys/ofed/drivers/infiniband/core/addr.c
@@ -459,12 +459,12 @@ mcast:
/*
* Resolve the link local address.
*/
- if (dst_in->sa_family == AF_INET)
- error = arpresolve(ifp, rte, NULL, dst_in, edst, &lle);
#ifdef INET6
- else
+ if (dst_in->sa_family == AF_INET6)
error = nd6_storelladdr(ifp, NULL, dst_in, (u_char *)edst, &lle);
+ else
#endif
+ error = arpresolve(ifp, rte, NULL, dst_in, edst, &lle);
RTFREE(rte);
if (error == 0)
return rdma_copy_addr(addr, ifp, edst);
diff --git a/sys/ofed/drivers/infiniband/core/cma.c b/sys/ofed/drivers/infiniband/core/cma.c
index c016451ba0b0..759cf613756e 100644
--- a/sys/ofed/drivers/infiniband/core/cma.c
+++ b/sys/ofed/drivers/infiniband/core/cma.c
@@ -1242,7 +1242,9 @@ static void cma_set_compare_data(enum rdma_port_space ps, struct sockaddr *addr,
struct cma_hdr *cma_data, *cma_mask;
struct sdp_hh *sdp_data, *sdp_mask;
__be32 ip4_addr;
+#ifdef INET6
struct in6_addr ip6_addr;
+#endif
memset(compare, 0, sizeof *compare);
cma_data = (void *) compare->data;
@@ -2920,10 +2922,13 @@ static void cma_set_mgid(struct rdma_id_private *id_priv,
unsigned char mc_map[MAX_ADDR_LEN];
struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr;
struct sockaddr_in *sin = (struct sockaddr_in *) addr;
+#ifdef INET6
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) addr;
+#endif
if (cma_any_addr(addr)) {
memset(mgid, 0, sizeof *mgid);
+#ifdef INET6
} else if ((addr->sa_family == AF_INET6) &&
((be32_to_cpu(sin6->sin6_addr.s6_addr32[0]) & 0xFFF0FFFF) ==
0xFF10A01B)) {
@@ -2934,6 +2939,7 @@ static void cma_set_mgid(struct rdma_id_private *id_priv,
if (id_priv->id.ps == RDMA_PS_UDP)
mc_map[7] = 0x01; /* Use RDMA CM signature */
*mgid = *(union ib_gid *) (mc_map + 4);
+#endif
} else {
ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map);
if (id_priv->id.ps == RDMA_PS_UDP)