Filter out non-routable ARP entries which confuse LQM

This commit is contained in:
Tim Wilkinson 2023-02-01 22:38:17 -08:00 committed by Joe AE6XE
parent e515ed7ec6
commit eefcc888dc
1 changed files with 16 additions and 12 deletions

View File

@ -362,6 +362,9 @@ function lqm()
for mac, entry in pairs(arps) for mac, entry in pairs(arps)
do do
if entry.Device:match("%.2$") or entry.Device:match("^br%-dtdlink") then if entry.Device:match("%.2$") or entry.Device:match("^br%-dtdlink") then
-- Sometimes we find arp entries are not routable. Filter them out early.
local rt = ip.route(entry["IP address"])
if rt and tostring(rt.gw) == entry["IP address"] then
stations[#stations + 1] = { stations[#stations + 1] = {
type = "DtD", type = "DtD",
device = entry.Device, device = entry.Device,
@ -376,6 +379,7 @@ function lqm()
} }
end end
end end
end
-- Xlink -- Xlink
if nixio.fs.stat("/etc/config.mesh/xlink") then if nixio.fs.stat("/etc/config.mesh/xlink") then