An node with a single RF link cant have exposed nodes

This commit is contained in:
Tim Wilkinson 2023-01-14 22:30:19 -08:00 committed by Joe AE6XE
parent b26017c2d1
commit 21c3b80e59
2 changed files with 11 additions and 2 deletions

View File

@ -1 +1 @@
KN6PLV-openwrt-22.3.0-lua-1461feb
KN6PLV-network-dsa-vlans-24a817a

View File

@ -480,6 +480,15 @@ function lqm()
local alt_distance = -1
local coverage = -1
-- Count the RF links we have
local rfcount = 0
for _, track in pairs(tracker)
do
if track.type == "RF" then
rfcount = rfcount + 1
end
end
-- Update link tracking state
for _, track in pairs(tracker)
do
@ -529,7 +538,7 @@ function lqm()
track.rev_snr = math.ceil(snr_run_avg * old_rev_snr + (1 - snr_run_avg) * rtrack.snr)
end
end
if not rtrack.blocked and not tracker[rtrack.mac] and not our_macs[rtrack.mac] then
if not rtrack.blocked and not tracker[rtrack.mac] and not our_macs[rtrack.mac] and rfcount > 1 then
track.exposed = true
end
end