aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2009-11-19 15:55:22 -0500
committerRoland Dreier <rolandd@cisco.com>2009-11-19 15:55:22 -0500
commite2e626972e652d18520f84d69fc06cfa307d11ff (patch)
treedbb6f1cd534795a6ae3b1556cef44cb7b57da0c6 /drivers/infiniband/core
parent1c9b281997b5876c0c8ed62506b56db89d262b57 (diff)
RDMA/cma: Fix AF_INET6 support in multicast joining
If joining to an AF_INET6 address, we need to map the address to a MGID in the same way as the IP stack. The old code would just fall through to the IPv4 case and generate garbage. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/cma.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 8bb2cf4031ae..052b4c01745d 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -2691,6 +2691,11 @@ static void cma_set_mgid(struct rdma_id_private *id_priv,
2691 0xFF10A01B)) { 2691 0xFF10A01B)) {
2692 /* IPv6 address is an SA assigned MGID. */ 2692 /* IPv6 address is an SA assigned MGID. */
2693 memcpy(mgid, &sin6->sin6_addr, sizeof *mgid); 2693 memcpy(mgid, &sin6->sin6_addr, sizeof *mgid);
2694 } else if ((addr->sa_family == AF_INET6)) {
2695 ipv6_ib_mc_map(&sin6->sin6_addr, dev_addr->broadcast, mc_map);
2696 if (id_priv->id.ps == RDMA_PS_UDP)
2697 mc_map[7] = 0x01; /* Use RDMA CM signature */
2698 *mgid = *(union ib_gid *) (mc_map + 4);
2694 } else { 2699 } else {
2695 ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map); 2700 ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map);
2696 if (id_priv->id.ps == RDMA_PS_UDP) 2701 if (id_priv->id.ps == RDMA_PS_UDP)