Don't silently ignore udp port forwarding option

Currently it ignores the option and turns it into a tcp port.
Instead warn about the UDP option and skip it.
This commit is contained in:
Nicholas Brown 2018-02-02 13:03:23 +00:00
parent 11eebbc05a
commit dea85d7cbc
2 changed files with 7 additions and 0 deletions

View File

@ -47,6 +47,11 @@ module VagrantPlugins
message_attributes
))
if fp[:protocol] == 'udp'
env[:ui].warn I18n.t('vagrant_libvirt.warnings.forwarding_udp')
next
end
ssh_pid = redirect_port(
@env[:machine],
fp[:host_ip] || 'localhost',

View File

@ -54,6 +54,8 @@ en:
ignoring_virtual_size_too_small: |-
Ignoring requested virtual disk size of '%{requested}' as it is below
the minimum box image size of '%{minimum}'.
forwarding_udp: |-
Forwarding UDP ports is not supported. Ignoring.
errors:
package_not_supported: No support for package with libvirt. Create box manually.