diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2016-05-16 07:42:38 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2016-05-16 07:42:38 -0400 |
commit | 959efe8fe0f5cf8882b6401efddf02cba033cb32 (patch) | |
tree | c4c0f1490cf0800402337f01ddc3a9ba63c62d97 | |
parent | bfe62c85f3101a1840d184d82b1cf958c4fbb9c3 (diff) | |
download | nfs-utils-959efe8fe0f5cf8882b6401efddf02cba033cb32.tar.gz nfs-utils-959efe8fe0f5cf8882b6401efddf02cba033cb32.tar.xz nfs-utils-959efe8fe0f5cf8882b6401efddf02cba033cb32.zip |
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 <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | utils/gssd/gssd.c | 16 |
1 files changed, 16 insertions, 0 deletions
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; |