Author: jhb Date: Fri Mar 16 17:56:53 2012 New Revision: 233040 URL: http://svn.freebsd.org/changeset/base/233040
Log: Fix build with INET6 disabled. Modified: head/sys/ofed/drivers/infiniband/core/addr.c head/sys/ofed/drivers/infiniband/core/cma.c Modified: head/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/addr.c Fri Mar 16 17:30:22 2012 (r233039) +++ head/sys/ofed/drivers/infiniband/core/addr.c Fri Mar 16 17:56:53 2012 (r233040) @@ -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); Modified: head/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/cma.c Fri Mar 16 17:30:22 2012 (r233039) +++ head/sys/ofed/drivers/infiniband/core/cma.c Fri Mar 16 17:56:53 2012 (r233040) @@ -1242,7 +1242,9 @@ static void cma_set_compare_data(enum rd 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_ 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_ 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) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"