mirror of https://github.com/aredn/aredn.git
Never block short DtD links regardless of quality.
Ignore invalid mac from arp table when building lookup table. This avoids a problem where a mac can be in the table twice, once valid and once invalid with an old ip address.
This commit is contained in:
parent
a65e09e2ad
commit
f8d71b6552
|
@ -222,8 +222,10 @@ function lqm()
|
||||||
local arps = {}
|
local arps = {}
|
||||||
arptable(
|
arptable(
|
||||||
function (entry)
|
function (entry)
|
||||||
|
if entry["Flags"] ~= "0x0" then
|
||||||
arps[entry["HW address"]:upper()] = entry
|
arps[entry["HW address"]:upper()] = entry
|
||||||
end
|
end
|
||||||
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
local stations = {}
|
local stations = {}
|
||||||
|
@ -303,7 +305,7 @@ function lqm()
|
||||||
-- DtD
|
-- DtD
|
||||||
for mac, entry in pairs(arps)
|
for mac, entry in pairs(arps)
|
||||||
do
|
do
|
||||||
if entry.Device:match("%.2$") and entry["Flags"] ~= "0x0" then
|
if entry.Device:match("%.2$") then
|
||||||
stations[#stations + 1] = {
|
stations[#stations + 1] = {
|
||||||
type = "DtD",
|
type = "DtD",
|
||||||
device = entry.Device,
|
device = entry.Device,
|
||||||
|
@ -632,7 +634,7 @@ function lqm()
|
||||||
|
|
||||||
-- Block if quality is poor
|
-- Block if quality is poor
|
||||||
if track.quality then
|
if track.quality then
|
||||||
if not track.blocks.quality and track.quality < config.min_quality then
|
if not track.blocks.quality and track.quality < config.min_quality and (track.type ~= "DtD" or (track.distance and track.distance >= dtd_distance)) then
|
||||||
track.blocks.quality = true
|
track.blocks.quality = true
|
||||||
elseif track.blocks.quality and track.quality >= config.min_quality + config.margin_quality then
|
elseif track.blocks.quality and track.quality >= config.min_quality + config.margin_quality then
|
||||||
track.blocks.quality = false
|
track.blocks.quality = false
|
||||||
|
|
Loading…
Reference in New Issue