Fix node count (similar fix to status page) (#213)

This commit is contained in:
Tim Wilkinson 2022-01-31 06:45:05 -08:00 committed by GitHub
parent 1ddedbb1e6
commit c6c0244d94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -187,13 +187,15 @@ local olsr_nodes = 0
local olsr_routes = 0 local olsr_routes = 0
for i, node in ipairs(aredn.olsr.getOLSRRoutes()) for i, node in ipairs(aredn.olsr.getOLSRRoutes())
do do
olsr_total = olsr_total + 1 if node.genmask ~= 0 then -- don't count default route
if node.genmask ~= 32 then olsr_total = olsr_total + 1
olsr_nodes = olsr_nodes + 1 if node.genmask ~= 32 then
end olsr_nodes = olsr_nodes + 1
if node.etx <= 50 then end
routes[node.destination] = { etx = node.etx } if node.etx <= 50 then
olsr_routes = olsr_routes + 1 routes[node.destination] = { etx = node.etx }
olsr_routes = olsr_routes + 1
end
end end
end end
-- low memory route reduction -- low memory route reduction