From d47ac13ae99fab04eb2725ad782d4857720f52a9 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 23 Nov 2005 23:16:26 +0000 Subject: [PATCH] r4128: Fix setting source/destination addresses. Signed-off-by: Sean Hefty --- include/rdma/rdma_cma_abi.h | 3 ++- src/cma.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/rdma/rdma_cma_abi.h b/include/rdma/rdma_cma_abi.h index 40290b27..db96894d 100644 --- a/include/rdma/rdma_cma_abi.h +++ b/include/rdma/rdma_cma_abi.h @@ -113,9 +113,10 @@ struct ucma_abi_query_route_resp { __u64 node_guid; struct ib_kern_path_rec ib_route[2]; struct sockaddr_in6 src_addr; + struct sockaddr_in6 dst_addr; __u32 num_paths; __u8 port_num; - __u8 reserved[7]; + __u8 reserved[3]; }; struct ucma_abi_conn_param { diff --git a/src/cma.c b/src/cma.c index 5525a139..7a3557ab 100644 --- a/src/cma.c +++ b/src/cma.c @@ -369,6 +369,8 @@ static int ucma_query_route(struct rdma_cm_id *id) id->route.addr.addr.ibaddr.pkey = resp->ib_route[0].pkey; memcpy(&id->route.addr.src_addr, &resp->src_addr, sizeof id->route.addr.src_addr); + memcpy(&id->route.addr.dst_addr, &resp->dst_addr, + sizeof id->route.addr.dst_addr); if (!id_priv->cma_dev && resp->node_guid) { ret = ucma_get_device(id_priv, resp->node_guid); -- 2.41.0