mirror of https://github.com/aredn/aredn.git
Fix node count (similar fix to status page) (#213)
This commit is contained in:
parent
1ddedbb1e6
commit
c6c0244d94
|
@ -187,6 +187,7 @@ 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
|
||||||
|
if node.genmask ~= 0 then -- don't count default route
|
||||||
olsr_total = olsr_total + 1
|
olsr_total = olsr_total + 1
|
||||||
if node.genmask ~= 32 then
|
if node.genmask ~= 32 then
|
||||||
olsr_nodes = olsr_nodes + 1
|
olsr_nodes = olsr_nodes + 1
|
||||||
|
@ -196,6 +197,7 @@ do
|
||||||
olsr_routes = olsr_routes + 1
|
olsr_routes = olsr_routes + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
-- low memory route reduction
|
-- low memory route reduction
|
||||||
if olsr_routes > lowroutes and nixio.sysinfo().freeram < lowmemory then
|
if olsr_routes > lowroutes and nixio.sysinfo().freeram < lowmemory then
|
||||||
local list = {}
|
local list = {}
|
||||||
|
|
Loading…
Reference in New Issue