[ofa-general] RE: [Bug 581] rdma_get_src_port() not returning the correct port.

Sean Hefty sean.hefty at intel.com
Wed Apr 25 15:47:50 PDT 2007


Can you give this a try?

The source address was being overwritten by whatever the user passed into
rdma_bind_addr.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
diff --git a/src/cma.c b/src/cma.c
index c5f8cd9..fdadb69 100644
--- a/src/cma.c
+++ b/src/cma.c
@@ -509,12 +509,7 @@ int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr
*addr)
 	if (ret != size)
 		return (ret > 0) ? -ENODATA : ret;
 
-	ret = ucma_query_route(id);
-	if (ret)
-		return ret;
-
-	memcpy(&id->route.addr.src_addr, addr, addrlen);
-	return 0;
+	return ucma_query_route(id);
 }
 
 int rdma_resolve_addr(struct rdma_cm_id *id, struct sockaddr *src_addr,




More information about the general mailing list