mirror of https://github.com/aredn/aredn.git
Ignore non-routable when calculating hidden nodes (#665)
* Exclude neighbor's neighbors which are non-routable. If a neighbor node's neighbor is non-routable, then no traffic will flow from it, so it's not hidden * Use routable flag for exposed node detection
This commit is contained in:
parent
aa9dba04a6
commit
aa76c06b6a
|
@ -525,12 +525,14 @@ function lqm()
|
||||||
if tonumber(rtrack.lat) and tonumber(rtrack.lon) and lat and lon then
|
if tonumber(rtrack.lat) and tonumber(rtrack.lon) and lat and lon then
|
||||||
rdistance = calc_distance(lat, lon, tonumber(rtrack.lat), tonumber(rtrack.lon))
|
rdistance = calc_distance(lat, lon, tonumber(rtrack.lat), tonumber(rtrack.lon))
|
||||||
end
|
end
|
||||||
|
if rtrack.routable then
|
||||||
rflinks[track.mac][rtrack.ip] = {
|
rflinks[track.mac][rtrack.ip] = {
|
||||||
ip = rtrack.ip,
|
ip = rtrack.ip,
|
||||||
hostname = rhostname,
|
hostname = rhostname,
|
||||||
distance = rdistance
|
distance = rdistance
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if myhostname == rhostname then
|
if myhostname == rhostname then
|
||||||
if not old_rev_snr or not rtrack.snr then
|
if not old_rev_snr or not rtrack.snr then
|
||||||
track.rev_snr = rtrack.snr
|
track.rev_snr = rtrack.snr
|
||||||
|
@ -538,7 +540,7 @@ function lqm()
|
||||||
track.rev_snr = math.ceil(snr_run_avg * old_rev_snr + (1 - snr_run_avg) * rtrack.snr)
|
track.rev_snr = math.ceil(snr_run_avg * old_rev_snr + (1 - snr_run_avg) * rtrack.snr)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not rtrack.blocked and not tracker[rtrack.mac] and not our_macs[rtrack.mac] and rfcount > 1 then
|
if rtrack.routable and not tracker[rtrack.mac] and not our_macs[rtrack.mac] and rfcount > 1 then
|
||||||
track.exposed = true
|
track.exposed = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue