diff options
author | jhb <jhb@FreeBSD.org> | 2012-03-16 17:56:53 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-03-16 17:56:53 +0000 |
commit | 470058843222ac697f7dc1e6fde8e2ba8bf6893c (patch) | |
tree | 09c2f3924dd70135ffc0b1bd8ca60c7ec8b8b6eb | |
parent | 24eb4e2893fb9114180f1dcd2c8fb900a0e126d9 (diff) | |
download | FreeBSD-src-470058843222ac697f7dc1e6fde8e2ba8bf6893c.zip FreeBSD-src-470058843222ac697f7dc1e6fde8e2ba8bf6893c.tar.gz |
Fix build with INET6 disabled.
-rw-r--r-- | sys/ofed/drivers/infiniband/core/addr.c | 6 | ||||
-rw-r--r-- | sys/ofed/drivers/infiniband/core/cma.c | 6 |
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 cde4037..512aefaf 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 c016451..759cf61 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) |