From: Sean Hefty Date: Mon, 11 Nov 2013 18:24:54 +0000 (-0800) Subject: Retrieve SGID after calling rdma_bind_addr X-Git-Tag: v1.0.18~6 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c38d43aa2d5dc39dd98f813749dfa496875ad2e1;p=~shefty%2Flibrdmacm.git Retrieve SGID after calling rdma_bind_addr 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 Signed-off-by: Sean Hefty --- diff --git a/src/cma.c b/src/cma.c index 4f41879a..0cf4203f 100644 --- 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)