]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Retrieve SGID after calling rdma_bind_addr
authorSean Hefty <sean.hefty@intel.com>
Thu, 14 Nov 2013 23:52:48 +0000 (15:52 -0800)
committerSean Hefty <sean.hefty@intel.com>
Fri, 15 Nov 2013 00:37:59 +0000 (16:37 -0800)
A change was made to rdma_bind_addr when AF_IB is enabled
to only retrieve the resulting bound address.  Previously,
rdma_bind_addr would retrieve the corresponding SGID as
well.  This breaks some apps which were checking the
SGID after binding to an IP address.  Revert to the
previous behavior of also retrieving the SGID after
calling rdma_bind_addr.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/cma.c

index 2fb9913ae6c69c29c74a27ff32955ca5fa7f3eea..733c199e3ae7c2ab5cf9a1d6bfd78d4454a26964 100755 (executable)
--- a/src/cma.c
+++ b/src/cma.c
@@ -753,7 +753,10 @@ static int rdma_bind_addr2(struct rdma_cm_id *id, struct sockaddr *addr,
        if (ret != sizeof cmd)
                return (ret >= 0) ? ERR(ENODATA) : -1;
 
-       return ucma_query_addr(id);
+       ret = ucma_query_addr(id);
+       if (!ret)
+               ret = ucma_query_gid(id);
+       return ret;
 }
 
 int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr)