Improve xlink reporting in sysinfo (#1127)

This commit is contained in:
Tim Wilkinson 2024-03-26 16:23:32 -07:00 committed by GitHub
parent 2fc76191a0
commit ff02f129f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -71,6 +71,8 @@ function model.getOLSRInterfaceType(iface)
it="TUN"
elseif string.match(iface,"wg") then
it="WIREGUARD"
elseif string.match(iface,"^br0%.%d+$") then
it="XLINK"
end
return it
end
@ -87,9 +89,10 @@ function model.getCurrentNeighbors(RFinfo)
info[mainip]={}
if host~=nil then
host = string.gsub(host,"mid%d+.", "")
host = string.gsub(host,"mid%d+%.", "")
host = string.gsub(host,"dtdlink%.", "")
host = string.gsub(host,".local.mesh$","")
host = string.gsub(host,"xlink%d+%.", "")
host = string.gsub(host,"%.local%.mesh$","")
info[mainip]['hostname']=host
else
info[mainip]['hostname']=mainip