summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2008-02-11 23:23:21 +0000
committerkris <kris@FreeBSD.org>2008-02-11 23:23:21 +0000
commit989a96d5cb275865259133d5282761b7a4bf0de8 (patch)
tree57916269ae94baf4c1e5e8e07c685703b778cbc7 /sys/nfsclient
parente3f122733ae5a2ff4d38fe7d3a3da82749c22f68 (diff)
downloadFreeBSD-src-989a96d5cb275865259133d5282761b7a4bf0de8.zip
FreeBSD-src-989a96d5cb275865259133d5282761b7a4bf0de8.tar.gz
Switch the default NFS mount mode from UDP to TCP. UDP mounts are a
historical relic, and are no longer appropriate for either LAN or WAN mounting. At modern (gigabit and 10 gigabit) LAN speeds packet loss from socket buffer fill events is common, and sequence numbers wrap quickly enough that data corruption is possible. TCP solves both of these problems without imposing significant overhead. MFC after: 1 month
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_diskless.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_diskless.c b/sys/nfsclient/nfs_diskless.c
index 4825d31..a970b1d 100644
--- a/sys/nfsclient/nfs_diskless.c
+++ b/sys/nfsclient/nfs_diskless.c
@@ -204,8 +204,8 @@ match_done:
/* set up root mount */
nd->root_args.rsize = 8192; /* XXX tunable? */
nd->root_args.wsize = 8192;
- nd->root_args.sotype = SOCK_DGRAM;
- nd->root_args.flags = (NFSMNT_WSIZE | NFSMNT_RSIZE | NFSMNT_RESVPORT);
+ nd->root_args.sotype = SOCK_STREAM;
+ nd->root_args.flags = (NFSMNT_NFSV3 | NFSMNT_WSIZE | NFSMNT_RSIZE | NFSMNT_RESVPORT);
if (inaddr_to_sockaddr("boot.nfsroot.server", &nd->root_saddr)) {
printf("nfs_diskless: no server\n");
return;
OpenPOWER on IntegriCloud