]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Retrieve SGID after calling rdma_bind_addr
authorSean Hefty <sean.hefty@intel.com>
Mon, 11 Nov 2013 18:24:54 +0000 (10:24 -0800)
committerSean Hefty <sean.hefty@intel.com>
Mon, 11 Nov 2013 18:24:54 +0000 (10:24 -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.

Tested-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/cma.c

index 4f41879a4df507e1562921447f7695eca18fd39d..0cf4203f2bdcaee8b88ca09bcc9e7731cd861843 100644 (file)
--- 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)