Fixes issue with host pools assignment

This commit is contained in:
Matteo Biscosi 2024-07-12 18:13:25 +02:00
parent 3a08b62e05
commit e877739a91
2 changed files with 8 additions and 2 deletions

View file

@ -44,7 +44,14 @@ if host_pool_id ~= tostring(host["host_pool_id"]) then
local host_pools = require "host_pools"
local host_pools_instance = host_pools:create()
local key = host2member(host_info["host"], host_info["vlan"])
local key = ""
if host["host_pool_match"] == "mac" then
key = host["mac"]
else
key = host2member(host_info["host"], host_info["vlan"])
end
if host_pools_instance:bind_member(key, tonumber(host_pool_id)) then
ntop.reloadHostPools()
else