Commit 8dd19f9f authored by Trond Myklebust's avatar Trond Myklebust

Make the client act correctly if the RPC server's asserts

that it does not support a given program, version or
procedure call.
parent 5d371cbc
...@@ -960,6 +960,24 @@ call_verify(struct rpc_task *task) ...@@ -960,6 +960,24 @@ call_verify(struct rpc_task *task)
switch ((n = ntohl(*p++))) { switch ((n = ntohl(*p++))) {
case RPC_SUCCESS: case RPC_SUCCESS:
return p; return p;
case RPC_PROG_UNAVAIL:
printk(KERN_WARNING "RPC: %4d call_verify: program %u is unsupported by server %s\n",
task->tk_pid, (unsigned int)task->tk_client->cl_prog,
task->tk_client->cl_server);
goto out_eio;
case RPC_PROG_MISMATCH:
printk(KERN_WARNING "RPC: %4d call_verify: program %u, version %u unsupported by server %s\n",
task->tk_pid, (unsigned int)task->tk_client->cl_prog,
(unsigned int)task->tk_client->cl_vers,
task->tk_client->cl_server);
goto out_eio;
case RPC_PROC_UNAVAIL:
printk(KERN_WARNING "RPC: %4d call_verify: proc %u unsupported by program %u, version %u on server %s\n",
task->tk_pid, (unsigned int)task->tk_msg.rpc_proc,
(unsigned int)task->tk_client->cl_prog,
(unsigned int)task->tk_client->cl_vers,
task->tk_client->cl_server);
goto out_eio;
case RPC_GARBAGE_ARGS: case RPC_GARBAGE_ARGS:
break; /* retry */ break; /* retry */
default: default:
...@@ -977,6 +995,7 @@ call_verify(struct rpc_task *task) ...@@ -977,6 +995,7 @@ call_verify(struct rpc_task *task)
return NULL; return NULL;
} }
printk(KERN_WARNING "RPC: garbage, exit EIO\n"); printk(KERN_WARNING "RPC: garbage, exit EIO\n");
out_eio:
rpc_exit(task, -EIO); rpc_exit(task, -EIO);
return NULL; return NULL;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment