Validation so private network IP doesn't end in .1 [GH-1750]

This commit is contained in:
Mitchell Hashimoto 2013-07-20 00:43:42 -04:00
parent b2d1a26dcf
commit 2d16588952
3 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,7 @@ BUG FIXES:
error properly if they collide. [GH-1701]
- Retry SSH on ENETUNREACH error. [GH-1732]
- NFS is silently ignored on Windows. [GH-1748]
- Validation so that private network static IP does not end in ".1" [GH-1750]
## 1.2.4 (July 16, 2013)

View File

@ -407,6 +407,10 @@ module VagrantPlugins
errors << I18n.t("vagrant.config.vm.network_ip_required")
end
end
if options[:ip] && options[:ip].end_with?(".1")
errors << I18n.t("vagrant.config.vm.network_ip_ends_in_one")
end
end
end

View File

@ -646,6 +646,9 @@ en:
nfs_requires_host: |-
Using NFS shared folders requires a host to be specified
using `config.vagrant.host`.
network_ip_ends_in_one: |-
Static IPs cannot end in ".1" since that address is always
reserved for the router. Please use another ending.
network_ip_required: |-
An IP is required for a private network.
network_fp_host_not_unique: |-