static int nfs_mount_reply(uchar *pkt, unsigned len)
{
struct rpc_t rpc_pkt;
+ int ret;
debug("%s\n", __func__);
else if (ntohl(rpc_pkt.u.reply.id) < rpc_id)
return -NFS_RPC_DROP;
- if (rpc_pkt.u.reply.rstatus ||
- rpc_pkt.u.reply.verifier ||
- rpc_pkt.u.reply.astatus ||
- rpc_pkt.u.reply.data[0])
- return -1;
+ ret = rpc_handle_error(&rpc_pkt);
+ if (ret)
+ return ret;
fs_mounted = 1;
/* NFSv2 and NFSv3 use same structure */
/* just to be sure... */
nfs_state = STATE_UMOUNT_REQ;
nfs_send();
+ } else if (reply == -NFS_RPC_PROG_MISMATCH &&
+ choosen_nfs_version != NFS_UNKOWN) {
+ nfs_state = STATE_MOUNT_REQ;
+ nfs_send();
} else {
nfs_state = STATE_LOOKUP_REQ;
nfs_send();