mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Warn once about our of DHCP range in case of multiple interfaces
This commit is contained in:
parent
16b6312508
commit
86416d9c5a
1 changed files with 3 additions and 1 deletions
|
|
@ -90,14 +90,16 @@ function system_setup_ui_utils.printConfigChange(sys_config, warnings)
|
|||
local dhcp_config = sys_config:getDhcpServerConfig()
|
||||
|
||||
if dhcp_config.enabled then
|
||||
local warn_dhcp_range = false
|
||||
for _, lan_config in pairs(lan_networks) do
|
||||
local lan_name = lan_config.iface
|
||||
if (not lan_name) or (not dhcp_config["subnet"][lan_name]) then
|
||||
goto continue
|
||||
end
|
||||
|
||||
if not sys_config:hasValidDhcpRange(dhcp_config["subnet"][lan_name]["first_ip"], dhcp_config["subnet"][lan_name]["last_ip"]) then
|
||||
if not sys_config:hasValidDhcpRange(dhcp_config["subnet"][lan_name]["first_ip"], dhcp_config["subnet"][lan_name]["last_ip"]) and not warn_dhcp_range then
|
||||
warnings[#warnings + 1] = i18n("nedge.invalid_dhcp_range")
|
||||
warn_dhcp_range = true -- warn once in case of multiple interfaces
|
||||
end
|
||||
::continue::
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue