Prevent assigning a network to the multiple Host Pools (#1150)

* Prevent assigning a network to the multiple Host Pools

* Simplify host pool search interface

* Fix for MAC addresses bugs and add user notifications

* Fix issues caused by the use of non normalized network keys

* Changes a warning message
This commit is contained in:
Emanuele Faranda 2017-04-14 12:17:16 +02:00 committed by simonemainardi
parent 532ca1d836
commit 1fbbe86e39
9 changed files with 306 additions and 61 deletions

View file

@ -1038,13 +1038,13 @@ function isValidPoolMember(member)
return false
end
function host2member(ip, vlan)
local prefix
if isIPv4(ip) then
prefix = 32
else
prefix = 128
function host2member(ip, vlan, prefix)
if prefix == nil then
if isIPv4(ip) then
prefix = 32
else
prefix = 128
end
end
return ip .. "/" .. tostring(prefix) .. "@" .. tostring(vlan)