diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-05-02 10:42:47 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2020-05-18 10:21:22 -0400 |
commit | decc13f7eb258b8c5c564ec1f11a24f14af275f8 (patch) | |
tree | 3a39221a7d1bd04dbf5094ff9603d61159c3aa22 /net/sunrpc | |
parent | 08e3c9f181bfb78d842c4f432888116d66e07c2f (diff) | |
download | linux-decc13f7eb258b8c5c564ec1f11a24f14af275f8.tar.gz linux-decc13f7eb258b8c5c564ec1f11a24f14af275f8.tar.bz2 linux-decc13f7eb258b8c5c564ec1f11a24f14af275f8.zip |
svcrdma: Displayed remote IP address should match stored address
Clean up: After commit 1e091c3bbf51 ("svcrdma: Ignore source port
when computing DRC hash"), the IP address stored in xpt_remote
always has a port number of zero. Thus, there's no need to display
the port number when displaying the IP address of a remote NFS/RDMA
client.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index ea54785db4f8..0a1125277a48 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -211,7 +211,12 @@ static void handle_connect_req(struct rdma_cm_id *new_cma_id, newxprt->sc_ord = param->initiator_depth; sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.dst_addr; - svc_xprt_set_remote(&newxprt->sc_xprt, sa, svc_addr_len(sa)); + newxprt->sc_xprt.xpt_remotelen = svc_addr_len(sa); + memcpy(&newxprt->sc_xprt.xpt_remote, sa, + newxprt->sc_xprt.xpt_remotelen); + snprintf(newxprt->sc_xprt.xpt_remotebuf, + sizeof(newxprt->sc_xprt.xpt_remotebuf) - 1, "%pISc", sa); + /* The remote port is arbitrary and not under the control of the * client ULP. Set it to a fixed value so that the DRC continues * to be effective after a reconnect. |