From d87dd018b099a2464f005fa761a5df1c25f637b9 Mon Sep 17 00:00:00 2001 From: Max Khon Date: Thu, 27 Jul 2017 14:00:53 +0600 Subject: [PATCH] nfs_udp is false by default if using NFS v4. --- plugins/synced_folders/nfs/synced_folder.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/synced_folders/nfs/synced_folder.rb b/plugins/synced_folders/nfs/synced_folder.rb index afceee49e..d0134d68c 100644 --- a/plugins/synced_folders/nfs/synced_folder.rb +++ b/plugins/synced_folders/nfs/synced_folder.rb @@ -127,9 +127,10 @@ module VagrantPlugins def prepare_folder(machine, opts) opts[:map_uid] = prepare_permission(machine, :uid, opts) opts[:map_gid] = prepare_permission(machine, :gid, opts) - opts[:nfs_udp] = true if !opts.key?(:nfs_udp) opts[:nfs_version] ||= 3 - + if !opts.key?(:nfs_udp) + opts[:nfs_udp] = !opts[:nfs_version].to_s.start_with?('4') + end if opts[:nfs_version].to_s.start_with?('4') && opts[:nfs_udp] machine.ui.info I18n.t("vagrant.actions.vm.nfs.v4_with_udp_warning")