Added client and server country as part of the active flows REST (#8957)

This commit is contained in:
Manuel Ceroni 2025-02-12 11:33:58 +01:00 committed by GitHub
parent 508d4d8a6d
commit b383fb4463
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,7 +90,7 @@ for _key, value in ipairs(flows_stats) do
client["name"] = stripVlan(cli_name)
client["ip"] = value["cli.ip"]
client["port"] = value["cli.port"]
client["country"] = value["cli.country"]
local info = interface.getHostInfo(value["cli.ip"], value["cli.vlan"])
if info then
client["is_broadcast_domain"] = info.broadcast_domain_host
@ -106,7 +106,7 @@ for _key, value in ipairs(flows_stats) do
server["name"] = stripVlan(srv_name)
server["ip"] = value["srv.ip"]
server["port"] = value["srv.port"]
server["country"] = value["srv.country"]
info = interface.getHostInfo(value["srv.ip"], value["srv.vlan"])
local info = interface.getHostInfo(value["cli.ip"], value["cli.vlan"])
if info then