aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-15 16:31:56 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:25:04 -0400
commit51b6ded4d9a94a61035deba1d8f51a54e3a3dd86 (patch)
treeec5a7a1cd573a2839e1af36aa74afb217dd1c01c /fs
parent2066fe89b459c3c787c811b3369df191cddd93d8 (diff)
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: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 665949d27798..b99113b0f65f 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -833,6 +833,9 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
833 __FUNCTION__); 833 __FUNCTION__);
834 return -EINVAL; 834 return -EINVAL;
835 } 835 }
836 /* RFC3530: The default port for NFS is 2049 */
837 if (addr.sin_port == 0)
838 addr.sin_port = NFS_PORT;
836 839
837 /* Grab the authentication type */ 840 /* Grab the authentication type */
838 authflavour = RPC_AUTH_UNIX; 841 authflavour = RPC_AUTH_UNIX;