From 959efe8fe0f5cf8882b6401efddf02cba033cb32 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Mon, 16 May 2016 07:42:38 -0400 Subject: gssd: Convert 'rdma' to 'tcp' protocol The kernel NFS client specifies 'rdma' as the transport protocol for NFS/RDMA mounts. This is a generic display token, probably not something the kernel should lie about. The kernel uses it to form NFSv4 client IDs, for example. Until gssd can speak RPC-over-RDMA, convert 'rdma' to 'tcp' in kernel gss upcalls. This means that the Linux NFS client requires an NFS/TCP service on an NFS/RDMA server when establishing a GSS context for proto=rdma mount points. This is probably not an onerous requirement for the time being. Eventually user space support for RPC-over-RDMA might be introduced, and gssd can use that for context establishment. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- utils/gssd/gssd.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'utils/gssd/gssd.c') diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c index 2179e15..3b4d147 100644 --- a/utils/gssd/gssd.c +++ b/utils/gssd/gssd.c @@ -303,6 +303,22 @@ gssd_read_service_info(int dirfd, struct clnt_info *clp) goto fail; } + /* + * The user space RPC library has no support for + * RPC-over-RDMA at this time, so change 'rdma' + * to 'tcp', and '20049' to '2049'. + */ + if (strcmp(protoname, "rdma") == 0) { + free(protoname); + protoname = strdup("tcp"); + if (!protoname) + goto fail; + free(port); + port = strdup("2049"); + if (!port) + goto fail; + } + if (!gssd_addrstr_to_sockaddr((struct sockaddr *)&clp->addr, address, port ? port : "")) goto fail; -- cgit