Commit 214c13e3 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: rpcbind should never reset the port to the value '0'



If we already had a valid port number for the RPC service, then we
should not allow the rpcbind client to set it to the invalid value '0'.

Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Reviewed-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent aa42add7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -820,10 +820,11 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
	}

	trace_rpcb_setport(child, map->r_status, map->r_port);
	if (map->r_port) {
		xprt->ops->set_port(xprt, map->r_port);
	if (map->r_port)
		xprt_set_bound(xprt);
	}
}

/*
 * XDR functions for rpcbind