Commit 51b6ded4 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: When mounting with a port=0 argument, substitute port=2049

RFC3530 states that the registered port 2049 for the NFS protocol should be
the default configuration in order to allow clients not to use the RPC
binding protocols.
If the mount program sends us a port=0, we therefore substitute port=2049.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 2066fe89
...@@ -833,6 +833,9 @@ static int nfs4_get_sb(struct file_system_type *fs_type, ...@@ -833,6 +833,9 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
__FUNCTION__); __FUNCTION__);
return -EINVAL; return -EINVAL;
} }
/* RFC3530: The default port for NFS is 2049 */
if (addr.sin_port == 0)
addr.sin_port = NFS_PORT;
/* Grab the authentication type */ /* Grab the authentication type */
authflavour = RPC_AUTH_UNIX; authflavour = RPC_AUTH_UNIX;
......
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