When using the same system as nfs-server and nfs-client, and using `nobind` option for autofs we would fall to the code where we let `mount.nfs(8)` to handle the mount. However, when the nfs-server and the nfs-client is the same system we end up calling `rpc_ping` which gives negative return code. Due to this we fall to the label next: and never attempt a mount of nfs share. This patch fixes this BUG by not probing rpc_ping if we're using rdma. Signed-off-by: Achilles Gaikwad <agaikwad@xxxxxxxxxx> --- modules/mount_nfs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c index 4e3e703..5a8c3bf 100644 --- a/modules/mount_nfs.c +++ b/modules/mount_nfs.c @@ -375,9 +375,13 @@ dont_probe: */ if (this->proximity == PROXIMITY_LOCAL) { char *host = this->name ? this->name : "localhost"; - int ret; - - ret = rpc_ping(host, port, vers, 2, 0, RPC_CLOSE_DEFAULT); + /* If we're using RDMA, rpc_ping will fail + * when nfs-server is local. + * Therefore, don't probe when we're using RDMA + */ + int ret = 1; + if(!rdma) + ret = rpc_ping(host, port, vers, 2, 0, RPC_CLOSE_DEFAULT); if (ret <= 0) goto next; } -- 2.26.2